Added product's brand selection in the general tab.

This commit is contained in:
Franck Allimant
2014-06-27 19:51:41 +02:00
parent 297b0bd6ce
commit 15f60ad22b
3 changed files with 39 additions and 2 deletions

View File

@@ -460,6 +460,7 @@ class Product extends BaseI18nLoop implements PropelSearchLoopInterface, SearchL
/** @var \Thelia\Core\Security\SecurityContext $securityContext */
$securityContext = $this->container->get('thelia.securityContext');
/** @var \Thelia\Model\Product $product */
foreach ($loopResult->getResultDataCollection() as $product) {
$loopResultRow = new LoopResultRow($product);
@@ -510,7 +511,6 @@ class Product extends BaseI18nLoop implements PropelSearchLoopInterface, SearchL
->set("TAXED_PROMO_PRICE" , $taxedPromoPrice)
->set("IS_PROMO" , $product->getVirtualColumn('is_promo'))
->set("IS_NEW" , $product->getVirtualColumn('is_new'))
;
@@ -989,6 +989,12 @@ class Product extends BaseI18nLoop implements PropelSearchLoopInterface, SearchL
return $loopResult;
}
/**
* @param $loopResultRow
* @param \Thelia\Model\Product $product
* @param $default_category_id
* @return mixed
*/
private function associateValues($loopResultRow, $product, $default_category_id)
{
$loopResultRow
@@ -1010,7 +1016,7 @@ class Product extends BaseI18nLoop implements PropelSearchLoopInterface, SearchL
->set("TEMPLATE" , $product->getTemplateId())
->set("DEFAULT_CATEGORY" , $default_category_id)
->set("TAX_RULE_ID" , $product->getTaxRuleId())
->set("BRAND_ID" , $product->getBrandId())
;