// Improve multishop API
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13566 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -87,7 +87,7 @@ class FavoriteProduct extends ObjectModel
|
||||
FROM `'._DB_PREFIX_.'favorite_product`
|
||||
WHERE `id_customer` = '.(int)$id_customer.'
|
||||
AND `id_product` = '.(int)$id_product.'
|
||||
AND `id_shop` = '.(int)$shop->getID(true)
|
||||
AND `id_shop` = '.(int)$shop->id
|
||||
);
|
||||
|
||||
if ($id_favorite_product)
|
||||
@@ -105,6 +105,6 @@ class FavoriteProduct extends ObjectModel
|
||||
FROM `'._DB_PREFIX_.'favorite_product`
|
||||
WHERE `id_customer` = '.(int)$id_customer.'
|
||||
AND `id_product` = '.(int)$id_product.'
|
||||
AND `id_shop` = '.(int)$shop->getID(true));
|
||||
AND `id_shop` = '.(int)$shop->id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ class FavoriteproductsActionsModuleFrontController extends ModuleFrontController
|
||||
$favorite_product = new FavoriteProduct();
|
||||
$favorite_product->id_product = $product->id;
|
||||
$favorite_product->id_customer = (int)Context::getContext()->cookie->id_customer;
|
||||
$favorite_product->id_shop = (int)Context::getContext()->shop->getID(true);
|
||||
$favorite_product->id_shop = (int)Context::getContext()->shop->id;
|
||||
if ($favorite_product->add())
|
||||
die('0');
|
||||
die(1);
|
||||
|
||||
@@ -56,7 +56,7 @@ if (Tools::getValue('action') && Tools::getValue('id_product') && Context::getCo
|
||||
$favorite_product = new FavoriteProduct();
|
||||
$favorite_product->id_product = $product->id;
|
||||
$favorite_product->id_customer = (int)Context::getContext()->cookie->id_customer;
|
||||
$favorite_product->id_shop = (int)Context::getContext()->shop->getID();
|
||||
$favorite_product->id_shop = (int)Context::getContext()->shop->id;
|
||||
if ($favorite_product->add())
|
||||
die('0');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user