// 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:
rMalie
2011-07-22 08:57:51 +00:00
parent 9619b93c73
commit e62be3d793
41 changed files with 263 additions and 191 deletions
+3 -3
View File
@@ -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