Skip to content

Commit

Permalink
fix: cart rule var for 1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
fox-john committed Dec 9, 2024
1 parent 8b0f05b commit 15f41fc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Service/ShopContent/CartRulesService.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,15 @@ private function castCartRules(&$cartRules)
$cartRule['reduction_tax'] = (bool) $cartRule['reduction_tax'];
$cartRule['reduction_currency'] = (int) $cartRule['reduction_currency'];
$cartRule['reduction_product'] = (int) $cartRule['reduction_product'];
$cartRule['reduction_exclude_special'] = (bool) $cartRule['reduction_exclude_special'];

$cartRule['gift_product'] = (int) $cartRule['gift_product'];
$cartRule['gift_product_attribute'] = (int) $cartRule['gift_product_attribute'];
$cartRule['highlight'] = (bool) $cartRule['highlight'];
$cartRule['active'] = (bool) $cartRule['active'];

if (defined('_PS_VERSION_') && version_compare(_PS_VERSION_, '1.7', '>=')) {
$cartRule['reduction_exclude_special'] = (bool) $cartRule['reduction_exclude_special'];
}
}
}
}

0 comments on commit 15f41fc

Please sign in to comment.