Added "brand" loop parameter

This commit is contained in:
Franck Allimant
2014-06-30 20:13:30 +02:00
parent 30afbf1433
commit c209df59f5

View File

@@ -64,6 +64,7 @@ class Product extends BaseI18nLoop implements PropelSearchLoopInterface, SearchL
)
),
Argument::createIntListTypeArgument('category'),
Argument::createIntListTypeArgument('brand'),
Argument::createIntListTypeArgument('category_default'),
Argument::createBooleanTypeArgument('new'),
Argument::createBooleanTypeArgument('promo'),
@@ -327,6 +328,12 @@ class Product extends BaseI18nLoop implements PropelSearchLoopInterface, SearchL
$search->filterById($this->request->get("product_id"), Criteria::NOT_IN);
}
$brand_id = $this->getBrand();
if ($brand_id !== null) {
$search->filterByBrandId($brand_id, Criteria::IN);
}
$current_category = $this->getCurrent_category();
if ($current_category === true) {