pse loop currency
This commit is contained in:
@@ -68,9 +68,9 @@ class ProductSaleElements extends BaseLoop
|
|||||||
new Argument(
|
new Argument(
|
||||||
'order',
|
'order',
|
||||||
new TypeCollection(
|
new TypeCollection(
|
||||||
new Type\EnumListType(array('alpha', 'alpha_reverse', 'attribute', 'attribute_reverse'))
|
new Type\EnumListType(array('min_price', 'max_price', 'promo', 'new', 'random'))
|
||||||
),
|
),
|
||||||
'attribute'
|
'random'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -125,8 +125,11 @@ class ProductSaleElements extends BaseLoop
|
|||||||
$defaultCurrency = CurrencyQuery::create()->findOneByByDefault(1);
|
$defaultCurrency = CurrencyQuery::create()->findOneByByDefault(1);
|
||||||
$defaultCurrencySuffix = '_default_currency';
|
$defaultCurrencySuffix = '_default_currency';
|
||||||
|
|
||||||
$search->joinProductPrice('price', Criteria::INNER_JOIN);
|
$search->joinProductPrice('price', Criteria::INNER_JOIN)
|
||||||
//->addJoinCondition('price', '');
|
->addJoinCondition('price', '`price`.`currency_id` = ?', $currency->getId(), null, \PDO::PARAM_INT);
|
||||||
|
|
||||||
|
$search->joinProductPrice('price' . $defaultCurrencySuffix, Criteria::INNER_JOIN)
|
||||||
|
->addJoinCondition('price_default_currency', '`price' . $defaultCurrencySuffix . '`.`currency_id` = ?', $defaultCurrency->getId(), null, \PDO::PARAM_INT);
|
||||||
|
|
||||||
$search->withColumn('`price`.CURRENCY_ID', 'price_CURRENCY_ID')
|
$search->withColumn('`price`.CURRENCY_ID', 'price_CURRENCY_ID')
|
||||||
->withColumn('`price`.PRICE', 'price_PRICE')
|
->withColumn('`price`.PRICE', 'price_PRICE')
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
{include file="includes/header.html"}
|
||||||
|
|
||||||
Here you are : {navigate to="current"}<br />
|
Here you are : {navigate to="current"}<br />
|
||||||
From : {navigate to="return_to"}<br />
|
From : {navigate to="return_to"}<br />
|
||||||
Index : {navigate to="index"}<br />
|
Index : {navigate to="index"}<br />
|
||||||
@@ -88,3 +90,5 @@ Index : {navigate to="index"}<br />
|
|||||||
{elseloop rel="product"}
|
{elseloop rel="product"}
|
||||||
<h2>Produit introuvable !</h2>
|
<h2>Produit introuvable !</h2>
|
||||||
{/elseloop}
|
{/elseloop}
|
||||||
|
|
||||||
|
{include file="includes/footer.html"}
|
||||||
Reference in New Issue
Block a user