diff --git a/core/lib/Thelia/Core/Template/Loop/ProductSaleElements.php b/core/lib/Thelia/Core/Template/Loop/ProductSaleElements.php
index f1bbb198d..9330a7e90 100755
--- a/core/lib/Thelia/Core/Template/Loop/ProductSaleElements.php
+++ b/core/lib/Thelia/Core/Template/Loop/ProductSaleElements.php
@@ -68,9 +68,9 @@ class ProductSaleElements extends BaseLoop
new Argument(
'order',
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);
$defaultCurrencySuffix = '_default_currency';
- $search->joinProductPrice('price', Criteria::INNER_JOIN);
- //->addJoinCondition('price', '');
+ $search->joinProductPrice('price', Criteria::INNER_JOIN)
+ ->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')
->withColumn('`price`.PRICE', 'price_PRICE')
diff --git a/templates/default_save/product.html b/templates/default_save/product.html
index f78b7e296..9d8dda432 100755
--- a/templates/default_save/product.html
+++ b/templates/default_save/product.html
@@ -1,3 +1,5 @@
+{include file="includes/header.html"}
+
Here you are : {navigate to="current"}
From : {navigate to="return_to"}
Index : {navigate to="index"}
@@ -87,4 +89,6 @@ Index : {navigate to="index"}
{elseloop rel="product"}