Jump to content

Available user discounts are not shown under "My vouchers" inside "My account"


Melissi

Recommended Posts

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?

my_account_my_vouchers.jpg

inside_cart.jpg

Link to comment
Share on other sites

  • 1 month later...
  • 1 year later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...