// id_shop on cart product (for links) + change Shop::sqlAsso() + share_order
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7687 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -114,7 +114,7 @@ class CartControllerCore extends FrontController
|
||||
/* Check the quantity availability */
|
||||
if ($idProductAttribute AND is_numeric($idProductAttribute))
|
||||
{
|
||||
if (!$delete AND !$producToAdd->isAvailableWhenOutOfStock($producToAdd->out_of_stock) AND !Attribute::checkAttributeQty((int)$idProductAttribute, (int)$qty))
|
||||
if (!$delete AND !Product::isAvailableWhenOutOfStock($producToAdd->out_of_stock) AND !Attribute::checkAttributeQty((int)$idProductAttribute, (int)$qty))
|
||||
if (Tools::getValue('ajax') == 'true')
|
||||
die('{"hasError" : true, "errors" : ["'.Tools::displayError('There is not enough product in stock.', false).'"]}');
|
||||
else
|
||||
@@ -124,8 +124,8 @@ class CartControllerCore extends FrontController
|
||||
{
|
||||
$idProductAttribute = Product::getDefaultAttribute((int)$producToAdd->id, (int)$producToAdd->out_of_stock == 2 ? !(int)Configuration::get('PS_ORDER_OUT_OF_STOCK') : !(int)$producToAdd->out_of_stock);
|
||||
if (!$idProductAttribute)
|
||||
Tools::redirectAdmin($link->getProductLink($producToAdd));
|
||||
elseif (!$delete AND !$producToAdd->isAvailableWhenOutOfStock($producToAdd->out_of_stock) AND !Attribute::checkAttributeQty((int)$idProductAttribute, (int)$qty))
|
||||
Tools::redirectAdmin($context->link->getProductLink($producToAdd));
|
||||
elseif (!$delete AND !Product::isAvailableWhenOutOfStock($producToAdd->out_of_stock) AND !Attribute::checkAttributeQty((int)$idProductAttribute, (int)$qty))
|
||||
if (Tools::getValue('ajax') == 'true')
|
||||
die('{"hasError" : true, "errors" : ["'.Tools::displayError('There is not enough product in stock.', false).'"]}');
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user