Jump to content

[Solved] Vouchers Not Dispalyed in Cart or My Vouchers


Recommended Posts

Solved: The DiscountControllers.php needed to be modified with the code provided by lordcracker in the 2nd post.

 

 

I have successfully used vouchers on 3 shops I have running 1.4.9.0 and understand how to use them there.

 

I created a clean install with 1.5.3.1 and have created a cart rule under the BO menu for price rules as shown below (sorry for the formatting, it didn't paste cleanly so I annotated the information to make it clear).

 

The following occurs:

1. I am able to type in the voucher code for people in the assigned group and the discounts occur as assigned

2. If I try and use the voucher code for a person not in the group, it will not take it (Good!)

3. I can not see the voucher displayed as "available" in either the cart for someone logged in (like it does on my 1.4.9.0 shop)

4. I can not see the voucher in "My Voucher" under the "My Account" section, even though the voucher code works for someone in that group.

 

What do I need to do in order to correct 3 & 4? The BO menu on 1.5 is different than 1.4, so maybe it's just something I have not done in the 1.5 BO correctly.

 

------------- Cart Rule settings for the voucher --------------------

Cart rule information

 

Name

 

 

*

1.jpg

Will be displayed in the cart summary as well as on the invoice.

Description

Provides free membership and racing for 2013 on members added to the Free Package Deal group

For you only, never displayed to the customer.

Code

(Click to generate random code)

Caution! The rule will automatically be applied if you leave this field blank.

Highlight

enabled.gif

If the voucher is not yet in the cart, it will be displayed under the cart in the cart summary.

Partial use

disabled.gif

Only applicable if the voucher value is greater than the cart total.

If you do not allow partial use, the voucher value will be lowered to the total order amount, but if you do, a new voucher will be created with the remainder.

Priority

1

 

Cart rules are applied to the cart by priority. A cart rule with priority of "1" will be processed before a cart rule with a priority of "2".

Status

enabled.gif

-------------------------------------------

 

Cart rule conditions

Limit to a single customer

 

Optional, the cart rule will be available for everyone if you leave this field blank.Valid

from 2013-01-01 22:58:16 to 2013-05-31 22:58:16

Default period is one month.

 

Minimum amount

0 USD

 

You can choose a minimum amount for the cart either with or without the taxes, and with or without shipping.

 

Total available

10

 

The cart rule will be applied to the first X customers only.

 

Total available for each user

1

A customer will only be able to use the cart rule X time(s).

 

Customer Group Selection

(the group I want is in the Selected Groups column)

------------------------------------------------------------------------------------------

Cart rule actions

Free shipping

disabled.gifApply a discount

enabled.gif Percent (%) Amount None

Value

100%

Does not apply to the shipping costs

 

Apply discount to

Order (without shipping) Checked->Specific product Cheapest product Selected product(s)

 

Product 2013Package

 

Send a free gift

disabled.gif

Edited by Rhapsody (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

Hello,

I was having problem on "My Vouchers" not beeing displayed.

What I did was:

 

edit the file /controllers/DiscountController.php

 

on line 46 change from:

 

$this->context->smarty->assign(array('nb_cart_rules' => (int)$nb_cart_rules, 'cart_rules' => $cart_rules));

 

to:

 

$this->context->smarty->assign(array('nb_cart_rules' => (int)$nb_cart_rules, 'cart_rules' => $cart_rules, 'discount' => $cart_rules, 'nbDiscounts' => (int)$nb_cart_rules));

 

Solved for me.

Link to comment
Share on other sites

@ lordcracker - That is exactly what was needed. Thanks very much. I wonder why the PS team removed this when they went from 1.4 to 1.5???

 

I have attached the override DiscountController.php that can be placed in \override\controllers\front\ for anyone else who wants the fix.

DiscountController.php

Edited by Rhapsody (see edit history)
Link to comment
Share on other sites

  • 4 weeks later...

@ balzai

 

If you are logged in and click on "My Vouchers" under "My Account" are there any vouchers displayed? If the answer is no, then the voucher hasn't been properly assigned.

 

I have this working on two different shops using the default 1.5.3.1 theme that I copied and customized. What theme are you using?

Link to comment
Share on other sites

I have the same problem in 1.5.3.1 in my account display " You do not have any vouchers"... I have changed this "

$this->context->smarty->assign(array('nb_cart_rules' => (int)$nb_cart_rules, 'cart_rules' => $cart_rules, 'discount' => $cart_rules, 'nbDiscounts' => (int)$nb_cart_rules));"

you have another idea?

 

use the theme default 1.5.3.1

Link to comment
Share on other sites

Hi Rhapsody

Thanks for your answer.

when I go into "My Account" >> "my vouchers" is shown correctly voucher, but no cart summary.

The template I am using in my store is not the default template prestashop, but if I change the default plantialla vouchers not shown, attached a screenshot.

thanks

post-35924-0-88749100-1363719840_thumb.jpg

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 weeks later...

Edit, was able to fix my inquiry (forgot to add stock to free item)

http://www.prestashop.com/forums/topic/243302-do-free-gift-voucher-items-not-display-in-the-cart-154/

 

Past message:

 

Offhand anyone know if free gift voucher items are supposed to be displayed in the customer's cart?

I have not been able to see them so it is very confusing to the customer if the voucher is active on a possible order.

Edited by djmonkeyboy (see edit history)
Link to comment
Share on other sites

  • 1 month later...

Hi Rhapsody

Thanks for your answer.

when I go into "My Account" >> "my vouchers" is shown correctly voucher, but no cart summary.

The template I am using in my store is not the default template prestashop, but if I change the default plantialla vouchers not shown, attached a screenshot.

thanks

 

Hi! did you get this fixed? Thanks

Link to comment
Share on other sites

  • 4 months later...
  • 1 month later...
  • 2 weeks later...

Hi all,

 

I have version 1.5.6.1 and the voucher option is not appearing in the checkout cart. I have checked the discountcontroller.php file and it seems fine to me. I am a but confused now with all these comments. Anyone that can tell me please what to do step by step? I would really appreciate ;)

 

Thanks, Isabel

Link to comment
Share on other sites

Hi guys !

 

It's quite a few days that I posted the comment above and I am not getting any responses. It seems as it is a recurring problem as other people are experiencing the same. Could somebody please let us know what we are supposed to do? This is quite an important matter for customers.

 

Cheers,

 

Izzyurrita

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...

Lordcracker - thanks very much for the affirmation of the solution.  I have this fix that Lordcracker provided to my original problem successfully operating on four shops running PS 1.5.6.2

 

As a general rule, whenever you change a template, clear the cache and recompile per my post #10 in this thread.

Link to comment
Share on other sites

  • 3 weeks later...

There is an other error source: the database

 

Check out ps_configuration for double entries (sort by name)

 

In my case it was PS_CART_RULE_FEATURE_ACTIVE one time 1 and one time 0

so I deleted one entry and it works fine.

Link to comment
Share on other sites

  • 3 weeks later...

Hi,

I´m encountering this problem. I have noticed that the cart rule WORKS PERFECTLY FINE, if NO GROUPS ARE SELECTED. So if I do not limit the discount to any groups, it works, but if I limit it to any of them, it doesn´t work anymore, for anybody. I mean if customer group selection is enabled.

 

I believe this is the problem, and would like to hear any suggestions to fix it, ASAP please =)

PS version 1.5.6.0 any

 

THANKS :)

Link to comment
Share on other sites

  • 3 weeks later...

There is an other error source: the database

 

Check out ps_configuration for double entries (sort by name)

 

In my case it was PS_CART_RULE_FEATURE_ACTIVE one time 1 and one time 0

so I deleted one entry and it works fine.

 

Hello. 
 
What I did, basing on your solution, was that when seeking the entry PS_CART_RULE_FEATURE_ACTIVE note that value was NULL, so I decided to change the value to 1 and it has worked. 
 
I hope it helps them equally. 
 
Regards 
Link to comment
Share on other sites

  • 2 months later...
  • 2 months later...

Hi Vekia

I am using PS 1.6 

I am trying to do catalog price rules. 

 

The attributes do not show in the catalog price rules, even though I have the product attributes filled in in the product attributes under products. There is only one attribute in the dropdown list, the other attributes don't show in the dropdown menu in the conditions tab in the catalog price rule tab.

 

On the other hand, in the catagory in the catalog price rule section/tab, there is the list of all catagories I have added, so I don't understand why the attributes I have already fille in are not in the dropdown menu. 

 

There is also an issue with the product  that quantity. When one product has a choice of either one packet or 4 packets the price per one unit does not display correctly. Can you help please, I have no idea on how to fix that....http://rosieposy.fr/en/childrens-disposable-nappies/1-bio-baby-disposable-biodegradable-nappies-t1-3-6-kg-1-packet-of-20-disposable-nappies-0013117023121.html thank you VERY much , kind regards Len

Link to comment
Share on other sites

  • 1 month later...

 

Hello. 
 
What I did, basing on your solution, was that when seeking the entry PS_CART_RULE_FEATURE_ACTIVE note that value was NULL, so I decided to change the value to 1 and it has worked. 
 
I hope it helps them equally. 
 
Regards 

 

 

I'm having the same problem and tried everything. Where do I find this to change? Where do I seek the entry?

Link to comment
Share on other sites

  • 2 years later...
×
×
  • Create New...