loop review
This commit is contained in:
@@ -67,7 +67,8 @@ class AssociatedContent extends Content
|
||||
/**
|
||||
* @param $pagination
|
||||
*
|
||||
* @return \Thelia\Core\Template\Element\LoopResult
|
||||
* @return LoopResult
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public function exec(&$pagination)
|
||||
{
|
||||
|
||||
@@ -58,7 +58,7 @@ class AttributeCombination extends BaseLoop
|
||||
protected function getArgDefinitions()
|
||||
{
|
||||
return new ArgumentCollection(
|
||||
Argument::createIntTypeArgument('product_sale_element', null, true),
|
||||
Argument::createIntTypeArgument('product_sale_elements', null, true),
|
||||
new Argument(
|
||||
'order',
|
||||
new TypeCollection(
|
||||
@@ -98,9 +98,9 @@ class AttributeCombination extends BaseLoop
|
||||
'ATTRIBUTE_AV_ID'
|
||||
);
|
||||
|
||||
$productSaleElement = $this->getProduct_sale_element();
|
||||
$productSaleElements = $this->getProduct_sale_elements();
|
||||
|
||||
$search->filterByProductSaleElementsId($productSaleElement, Criteria::EQUAL);
|
||||
$search->filterByProductSaleElementsId($productSaleElements, Criteria::EQUAL);
|
||||
|
||||
$orders = $this->getOrder();
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ class FeatureValue extends BaseLoop
|
||||
Argument::createIntTypeArgument('product', null, true),
|
||||
Argument::createIntListTypeArgument('feature_availability'),
|
||||
Argument::createBooleanTypeArgument('exclude_feature_availability', 0),
|
||||
Argument::createBooleanTypeArgument('exclude_default_values', 0),
|
||||
Argument::createBooleanTypeArgument('exclude_personal_values', 0),
|
||||
new Argument(
|
||||
'order',
|
||||
new TypeCollection(
|
||||
@@ -112,7 +112,7 @@ class FeatureValue extends BaseLoop
|
||||
$search->filterByFeatureAvId(null, Criteria::NULL);
|
||||
}
|
||||
|
||||
$excludeDefaultValues = $this->getExclude_default_values();
|
||||
$excludeDefaultValues = $this->getExclude_personal_values();
|
||||
if($excludeDefaultValues == true) {
|
||||
$search->filterByByDefault(null, Criteria::NULL);
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ use Thelia\Type;
|
||||
*
|
||||
* Product Sale Elements loop
|
||||
*
|
||||
* @todo : manage currency
|
||||
* @todo : manage currency and attribute_availability
|
||||
*
|
||||
* Class ProductSaleElements
|
||||
* @package Thelia\Core\Template\Loop
|
||||
@@ -56,7 +56,7 @@ class ProductSaleElements extends BaseLoop
|
||||
protected function getArgDefinitions()
|
||||
{
|
||||
return new ArgumentCollection(
|
||||
Argument::createIntTypeArgument('devise'),
|
||||
Argument::createIntTypeArgument('currency'),
|
||||
Argument::createIntTypeArgument('product', null, true),
|
||||
new Argument(
|
||||
'attribute_availability',
|
||||
@@ -106,7 +106,7 @@ class ProductSaleElements extends BaseLoop
|
||||
}
|
||||
}
|
||||
|
||||
$devise = $this->getDevise();
|
||||
$currency = $this->getCurrency();
|
||||
|
||||
$search->joinProductPrice('price', Criteria::INNER_JOIN);
|
||||
//->addJoinCondition('price', '');
|
||||
|
||||
Reference in New Issue
Block a user