// id_shop on cart product (for links) + change Shop::sqlAsso() + share_order

This commit is contained in:
rMalie
2011-07-22 08:57:51 +00:00
parent 89bcfec297
commit 3f9a9e41d7
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