Merge branch 'ticket-13564-giftOnShoppingCart' into develop

This commit is contained in:
Marion Muszynski 2017-07-18 10:18:50 +02:00
commit 42bca45df3

View File

@ -310,7 +310,7 @@ class CartController extends CartControllerCore
self::$cart->gift_message = ''; self::$cart->gift_message = '';
} elseif(Tools::getValue('action') == 'add_message'){ } elseif(Tools::getValue('action') == 'add_message'){
self::$cart->gift = 1; self::$cart->gift = 1;
if (!Validate::isMessage(Tools::getValue('message')) { if (!Validate::isMessage(Tools::getValue('message'))) {
die('{"hasError" : true, "errors" : ["'.Tools::displayError('Invalid gift message.', false).'"]}'); die('{"hasError" : true, "errors" : ["'.Tools::displayError('Invalid gift message.', false).'"]}');
} else { } else {
self::$cart->gift_message = strip_tags(Tools::getValue('message')); self::$cart->gift_message = strip_tags(Tools::getValue('message'));