Melissi Posted November 26, 2017 Share Posted November 26, 2017 I am using PrestaShop 1.6.1.17 with custom theme and i have enabled discounts in my store. The problem is that the user is not seeing nor his personal vouchers (set in "Cart rules->Conditions->limit to single user") nor any other (e.g. for all users) under his "Account->Myvouchers". Although the user can see offers (limited for him and those for everyone) inside cart, I still want to show those under his account management. I tried to play around with smarty variables in "discount.tpl" and it shows these settings: isset($cart_rules): 1 count($cart_rules): 0 $nb_cart_rules: 1 Inside "DiscountController.php" I pass these to the view: $this->context->smarty->assign(array( 'nb_cart_rules' => (int)$nb_cart_rules, 'cart_rules' => $cart_rules, 'discount' => $cart_rules, // retro compatibility 'nbDiscounts' => (int)$nb_cart_rules // retro compatibility )); In MYSQL the table "pscm_configuration" did not have entry "PS_CART_RULE_FEATURE_ACTIVE", so I add it and set value "1" to it. This did not help either. What else can I try? Link to comment Share on other sites More sharing options...
Christos Georgiades Posted December 29, 2017 Share Posted December 29, 2017 I had exactly the same problem. Solution for me was to replace controllers/front/DiscountController.php with this: https://raw.githubusercontent.com/PrestaShop/PrestaShop/1.6.1.x/controllers/front/DiscountController.php Link to comment Share on other sites More sharing options...
NikiIA Posted August 21, 2019 Share Posted August 21, 2019 I currently have this issue in 1.6.1.17 as well. My developers tried the solution in the link above with no success. Has this worked for others or has there been a different solution to this issue? Link to comment Share on other sites More sharing options...
jeromecollection Posted May 6 Share Posted May 6 solution for 1.6.1.x IN controllers/front/DiscountController.php replace if ($discount['gift_product'] !== 0) { by if ($discount['gift_product'] !== "0") { Nota: finaly "0" instead of 0 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now