// Add "Allow seperated package" checkbox on the cart

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10698 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
mDeflotte
2011-11-28 10:50:54 +00:00
parent 73148dda1d
commit bd9bcc6729
4 changed files with 62 additions and 6 deletions
+12
View File
@@ -72,6 +72,8 @@ class CartControllerCore extends FrontController
$this->processDeleteProductInCart();
else if(Tools::getIsset('changeAddressDelivery'))
$this->processChangeProductAddressDelivery();
else if(Tools::getIsset('allowSeperatedPackage'))
$this->processAllowSeperatedPackage();
else if(Tools::getIsset('duplicate'))
$this->processDuplicateProduct();
@@ -124,6 +126,16 @@ class CartControllerCore extends FrontController
$old_id_address_delivery,
$new_id_address_delivery);
}
protected function processAllowSeperatedPackage()
{
if (Tools::getValue('value') === false)
die('{"error":true, "error_message": "No value setted"}');
$this->context->cart->allow_seperated_package = (boolean)Tools::getValue('value');
$this->context->cart->update();
die('{"error":false}');
}
protected function processDuplicateProduct()
{