Jump to content
Rhapsody

[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)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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)

Share this post


Link to post
Share on other sites

The Prestashop team incorporated the fix from lordcracker in the core code based on the report on the bug tracker. I assume this will show up in the next release after 1.5.3.1, but for now use the override above, or download the core code from github.

Share this post


Link to post
Share on other sites

Hello,

 

The fix doesn't work for me. I have a 1.5.3.1 clean version. :(

Share this post


Link to post
Share on other sites

for anyone who has problems making this work, delete the files in the /prestashop/cache/smarty/compile then force compile for all templates.

Share this post


Link to post
Share on other sites

Hi Rhapsody

I made the changes indicated in controllers / front / DiscountController.php and delete the files in the cache / smarty / cache / / compile, but fails to operate.

screenshot attached use prestashop 1.5.3.1.

I do wrong?

thanks

post-35924-0-90244900-1363536675_thumb.jpg

Edited by balzai (see edit history)

Share this post


Link to post
Share on other sites

@ 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?

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
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

 

Hi! did you get this fixed? Thanks

Share this post


Link to post
Share on other sites

I still struggle with this issue in 1.5.6 - none of vouchers appear in cart. When your entered voucher is wrong or out of date, there is right information; when you enter a valid voucher code - page reloads and nothing more happens.

Share this post


Link to post
Share on other sites

Hi,

I made the changes and the file and deleted and force compilation but still doesn't work.

I have version 1.5.3.1 as many others in this post. Why is it mark as solved? Is the issue now been followed in other post?

 

Thanks you

 

Share this post


Link to post
Share on other sites

everything depends on what causing problems, usually it's related to problems with theme (if you use nondefault one).

please shed some more info what problem you've got exactly and some more information about your ps (what theme etc)

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Hi there !

 

My theme is Alysum and the problem I am encountering is that I configure the voucher on the BO but I am not managing to see it in the FO in the checkout process or in the user´s account.

 

Look forward to hearing from you.

 

Thanks, Izz

Share this post


Link to post
Share on other sites

Same problem, the random voucher code is not visible, instead, the name of the voucher is visible which does not work when applied. How to make the code visible instead of the voucher name>

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

hello

 

I have prestashop 1.5.6.1

I set everything in BO i can use voucher when ceck out but I can't see voucher in my account - my vouchers.

Share this post


Link to post
Share on other sites

Hi all, I'm just wondering why is this topic marked as SOLVED since we are all encountering this roblem.
Anyone find solution yet?? I'm having no luck..

Share this post


Link to post
Share on other sites

its because author of this theme solved own issue

 

 

for anyone who has problems making this work, delete the files in the /prestashop/cache/smarty/compile then force compile for all templates. 
  • Like 1

Share this post


Link to post
Share on other sites

I am always getting emails with replies to this problem.

Do you even try debugging it? Do you recompile the template after the change?

 

Did this in more than ten projects and it worked every time.

Edited by lordcracker (see edit history)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 :)

Share this post


Link to post
Share on other sites

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 

Share this post


Link to post
Share on other sites

How do you hide voucher codes that need to be hidden from selected groups in 'My Vouchers'?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

 

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?

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

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