[-] BO : you could not remove a gift once it had been set #PSCFV-3420
This commit is contained in:
@@ -104,6 +104,10 @@ class AdminCartRulesControllerCore extends AdminController
|
|||||||
if (!Tools::getValue($type.'_restriction'))
|
if (!Tools::getValue($type.'_restriction'))
|
||||||
$_POST[$type.'_restriction'] = 0;
|
$_POST[$type.'_restriction'] = 0;
|
||||||
|
|
||||||
|
// Remove the gift if the radio button is set to "no"
|
||||||
|
if (!(int)Tools::getValue('free_gift'))
|
||||||
|
$_POST['gift_product'] = 0;
|
||||||
|
|
||||||
// Retrieve the product attribute id of the gift (if available)
|
// Retrieve the product attribute id of the gift (if available)
|
||||||
if ($id_product = (int)Tools::getValue('gift_product'))
|
if ($id_product = (int)Tools::getValue('gift_product'))
|
||||||
$_POST['gift_product_attribute'] = (int)Tools::getValue('ipa_'.$id_product);
|
$_POST['gift_product_attribute'] = (int)Tools::getValue('ipa_'.$id_product);
|
||||||
|
|||||||
Reference in New Issue
Block a user