Jump to content

Cart Rules (Vouchers) Not Showing In Frontend


Recommended Posts

Hi! I've got a problem. I successfully generated a test cart rule and assigned to my user.

I can both see it in backoffice and on the my-account page under 'my vouchers'. So we're sure it's recorderd and assigned.

What happens is that in shopping-cart page, even after loggin in with my user, I can't see any voucher field.

Digging deeper, I can say that the $discounts template var is not populated, or, simply it counts zero. So I took a look to the controller, and saw it assign it via `$order->getCartRules()`. And getCartRules simply reads a db table. And surprise?? The order_cart_rule table is empty. So it doesn't get populated. So what's the problem here?

 

By the way, I'm running on latest prestashop 1.6.1.4

 

thank you

Share this post


Link to post
Share on other sites
  • 7 months later...

I just upgraded to 1.6.1.7 from 1.6.0.6 and I lost my highlighted cart rules in the shopping cart arena.

 

I have manually cleared smarty cache from the server, used the backoffice clear cache button, forced compilation, tried to see if paypal.js or any other issues are not showing the vouchers at the bottom of the cart but unable to find paypal.js code.

 

Any ideas for 1.6.1.7?

Share this post


Link to post
Share on other sites
  • 1 year later...

there is a bug with

\controllers\front\DiscountController.php

 

modify the code to (about line 56)

           if ((int)$discount['gift_product'] !== 0) {

 

Share this post


Link to post
Share on other sites
  • 2 weeks later...
On 11/9/2017 at 6:06 AM, skijump said:

@VicOffersI tried the code edit, cleared cache, and used a cleared browser on mozilla and chrome. No luck.

 

Still unable to have all the highlighted discounts showing on the cart page under vouchers...

please check the total quantity 

Share this post


Link to post
Share on other sites

@VicOffersI have tried various total quantities. I am now using a fresh install of 1.6.1.16 and getting odd results. I must be doing something wrong.

I create a cart rule for 5 of a product must be present to get a discount. If a user adds that product (quantity 1) the voucher only shows once then disappears when adjusting the quantities up and down. Basically "Take advantage of our exclusive offers:" disappears a lot of the time.

What's the chance of this on a fresh install?

Share this post


Link to post
Share on other sites

Additionally on the new install, if I set the highlighted voucher to "The cart must contain at least 1" product the  "Take advantage of our exclusive offers:" shows. If I set the "cart must contain" to 5 there is no "Take advantage of our exclusive offers:" highlighted message.

Hmmmm.....

Share this post


Link to post
Share on other sites
8 hours ago, skijump said:

Additionally on the new install, if I set the highlighted voucher to "The cart must contain at least 1" product the  "Take advantage of our exclusive offers:" shows. If I set the "cart must contain" to 5 there is no "Take advantage of our exclusive offers:" highlighted message.

Hmmmm.....

hi,can you upload some images of the setting?

Share this post


Link to post
Share on other sites
On 11/15/2017 at 1:43 PM, skijump said:

Additionally on the new install, if I set the highlighted voucher to "The cart must contain at least 1" product the  "Take advantage of our exclusive offers:" shows. If I set the "cart must contain" to 5 there is no "Take advantage of our exclusive offers:" highlighted message.

Hmmmm.....

 

if you leave the "code" blank,it will be applied automatically when the quantity reaches 5 ,so it won't show,

if you put in a code,it will  only show when the quantity >= 5

Share this post


Link to post
Share on other sites

@VicOffersCould you please check your installation if that occurs. I have tried that many times, cleared cache, and installed on 2 different servers/databases without it showing when the total is >=5..

The code inserted for the discount only shows when the total actually matches 5 and then shows you can use the code if wanting. It never shows when the total is less than 5 which is the most important even.

Thanks for your help on this issue. 

Share this post


Link to post
Share on other sites
On 11/21/2017 at 9:49 AM, skijump said:

@VicOffersIs the idea the customer must guess the amount they need to buy to get the code to appear? Thanks.

you should put some letters of the field "code" not leave blank

Share this post


Link to post
Share on other sites

@VicOffersHaha, I think you're just playing now. Yes, a "code" can be inserted or left blank.

The issue is the vouchers do not show either way in the voucher area unless the customer puts the exact quantity in for the voucher. It does not display with less quantity in the cart.

 

Share this post


Link to post
Share on other sites
On 10/30/2017 at 9:32 AM, VicOffers said:

there is a bug with

\controllers\front\DiscountController.php

 

modify the code to (about line 56)

           if ((int)$discount['gift_product'] !== 0) {

 

You saved my ass today. Thank you very much.

Share this post


Link to post
Share on other sites

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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More