[-] FO : #PSCFV-2158 - Add warning message when a product cannot be delivered to an address

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15021 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
mDeflotte
2012-05-03 08:10:09 +00:00
parent 0c66c60f1d
commit 513c9be298
9 changed files with 99 additions and 33 deletions
+6
View File
@@ -126,6 +126,12 @@ class CartControllerCore extends FrontController
$old_id_address_delivery = (int)Tools::getValue('old_id_address_delivery');
$new_id_address_delivery = (int)Tools::getValue('new_id_address_delivery');
if (!count(Carrier::getAvailableCarrierList(new Product($this->id_product), null, $new_id_address_delivery)))
die(Tools::jsonEncode(array(
'hasErrors' => true,
'error' => Tools::displayError('It\'s not possible to deliver this product to the selected address.', false),
)));
$this->context->cart->setProductAddressDelivery(
$this->id_product,
$this->id_product_attribute,