Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into bootstrap
Conflicts: admin-dev/themes/default/css/modules.css admin-dev/themes/default/template/controllers/carts/helpers/view/view.tpl admin-dev/themes/default/template/controllers/groups/helpers/form/form.tpl admin-dev/themes/default/template/controllers/groups/helpers/view/view.tpl admin-dev/themes/default/template/controllers/products/helpers/form/form.tpl admin-dev/themes/default/template/controllers/products/images.tpl admin-dev/themes/default/template/controllers/products/prices.tpl admin-dev/themes/default/template/helpers/form/form.tpl admin-dev/themes/default/template/helpers/list/list_header.tpl classes/Autoload.php classes/Carrier.php classes/Product.php classes/ProductSale.php classes/Tools.php classes/Validate.php classes/tax/TaxRulesTaxManager.php controllers/admin/AdminPPreferencesController.php controllers/admin/AdminPerformanceController.php install-dev/install_version.php js/admin_carrier_wizard.js modules/blockcategories/blockcategories.php modules/blocklayered/blocklayered.php modules/statsequipment/statsequipment.php modules/statsproduct/statsproduct.php modules/watermark/watermark.php themes/default/address.tpl themes/default/authentication.tpl themes/default/category.tpl themes/default/contact-form.tpl themes/default/css/history.css themes/default/header.tpl themes/default/js/cart-summary.js themes/default/js/product.js themes/default/mobile/order-detail.tpl themes/default/modules/blocksearch/blocksearch.tpl themes/default/modules/productcomments/productcomments.tpl themes/default/order-carrier.tpl themes/default/order-detail.tpl themes/default/order-opc-new-account.tpl themes/default/product.tpl
This commit is contained in:
@@ -171,6 +171,8 @@ class WishList extends ObjectModel
|
||||
*/
|
||||
public static function getByIdCustomer($id_customer)
|
||||
{
|
||||
if (!Validate::isUnsignedId($id_customer))
|
||||
die (Tools::displayError());
|
||||
if (Shop::getContextShopID())
|
||||
$shop_restriction = 'AND id_shop = '.(int)Shop::getContextShopID();
|
||||
elseif (Shop::getContextShopGroupID())
|
||||
@@ -178,14 +180,18 @@ class WishList extends ObjectModel
|
||||
else
|
||||
$shop_restriction = '';
|
||||
|
||||
if (!Validate::isUnsignedId($id_customer))
|
||||
die (Tools::displayError());
|
||||
return (Db::getInstance()->executeS('
|
||||
SELECT w.`id_wishlist`, w.`name`, w.`token`, w.`date_add`, w.`date_upd`, w.`counter`
|
||||
FROM `'._DB_PREFIX_.'wishlist` w
|
||||
WHERE `id_customer` = '.(int)($id_customer).'
|
||||
'.$shop_restriction.'
|
||||
ORDER BY w.`name` ASC'));
|
||||
$cache_id = 'WhishList::getByIdCustomer_'.(int)$id_customer.'-'.(int)Shop::getContextShopID().'-'.(int)Shop::getContextShopGroupID();
|
||||
if (!Cache::isStored($cache_id))
|
||||
{
|
||||
$result = Db::getInstance()->executeS('
|
||||
SELECT w.`id_wishlist`, w.`name`, w.`token`, w.`date_add`, w.`date_upd`, w.`counter`
|
||||
FROM `'._DB_PREFIX_.'wishlist` w
|
||||
WHERE `id_customer` = '.(int)($id_customer).'
|
||||
'.$shop_restriction.'
|
||||
ORDER BY w.`name` ASC');
|
||||
Cache::store($cache_id, $result);
|
||||
}
|
||||
return Cache::retrieve($cache_id);
|
||||
}
|
||||
|
||||
public static function refreshWishList($id_wishlist)
|
||||
|
||||
@@ -58,7 +58,7 @@ function WishlistCart(id, action, id_product, id_product_attribute, quantity)
|
||||
if($('#' + id).length != 0)
|
||||
{
|
||||
$('#' + id).slideUp('normal');
|
||||
document.getElementById(id).innerHTML = data;
|
||||
$('#' + id).html(data);
|
||||
$('#' + id).slideDown('normal');
|
||||
}
|
||||
}
|
||||
@@ -81,7 +81,7 @@ function WishlistChangeDefault(id, id_wishlist)
|
||||
success: function(data)
|
||||
{
|
||||
$('#' + id).slideUp('normal');
|
||||
document.getElementById(id).innerHTML = data;
|
||||
$('#' + id).html(data);
|
||||
$('#' + id).slideDown('normal');
|
||||
}
|
||||
});
|
||||
@@ -147,7 +147,7 @@ function WishlistManage(id, id_wishlist)
|
||||
success: function(data)
|
||||
{
|
||||
$('#' + id).hide();
|
||||
document.getElementById(id).innerHTML = data;
|
||||
$('#' + id).html(data);
|
||||
$('#' + id).fadeIn('slow');
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user