Rhapsody Posted January 20, 2013 Share Posted January 20, 2013 (edited) 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 * 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 If the voucher is not yet in the cart, it will be displayed under the cart in the cart summary. Partial use 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 ------------------------------------------- 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 Apply a discount 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 Edited January 29, 2013 by Rhapsody (see edit history) Link to comment Share on other sites More sharing options...
lordcracker Posted January 29, 2013 Share Posted January 29, 2013 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 More sharing options...
Rhapsody Posted January 29, 2013 Author Share Posted January 29, 2013 (edited) @ 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 January 29, 2013 by Rhapsody (see edit history) Link to comment Share on other sites More sharing options...
Rhapsody Posted February 4, 2013 Author Share Posted February 4, 2013 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. Link to comment Share on other sites More sharing options...
lordcracker Posted February 4, 2013 Share Posted February 4, 2013 Great! I'm glad I could help. Link to comment Share on other sites More sharing options...
scax Posted February 7, 2013 Share Posted February 7, 2013 Hello, Don't work for me strange :/ Link to comment Share on other sites More sharing options...
lucarobo Posted February 12, 2013 Share Posted February 12, 2013 in my PS 1.5.3.1 don't work!!! solutions??? 1 Link to comment Share on other sites More sharing options...
jakare00 Posted March 10, 2013 Share Posted March 10, 2013 Hello, The fix doesn't work for me. I have a 1.5.3.1 clean version. Link to comment Share on other sites More sharing options...
Rhapsody Posted March 15, 2013 Author Share Posted March 15, 2013 for anyone who has problems making this work, delete the files in the /prestashop/cache/smarty/compile then force compile for all templates. Link to comment Share on other sites More sharing options...
balzai Posted March 17, 2013 Share Posted March 17, 2013 (edited) 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 Edited March 17, 2013 by balzai (see edit history) Link to comment Share on other sites More sharing options...
Rhapsody Posted March 18, 2013 Author Share Posted March 18, 2013 @ 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 More sharing options...
erserpico Posted March 18, 2013 Share Posted March 18, 2013 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 More sharing options...
balzai Posted March 19, 2013 Share Posted March 19, 2013 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 Link to comment Share on other sites More sharing options...
Ron morales Posted April 9, 2013 Share Posted April 9, 2013 Not work 1.5.3.1 not work 1.5.4 Link to comment Share on other sites More sharing options...
djmonkeyboy Posted April 29, 2013 Share Posted April 29, 2013 (edited) 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 April 29, 2013 by djmonkeyboy (see edit history) Link to comment Share on other sites More sharing options...
l.zuccarini Posted June 18, 2013 Share Posted June 18, 2013 Any solution for 1.5.3.1 version? Link to comment Share on other sites More sharing options...
Saryus Posted June 23, 2013 Share Posted June 23, 2013 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 More sharing options...
shqvarny Posted October 29, 2013 Share Posted October 29, 2013 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. Link to comment Share on other sites More sharing options...
pamela91 Posted December 28, 2013 Share Posted December 28, 2013 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 Link to comment Share on other sites More sharing options...
vekia Posted December 29, 2013 Share Posted December 29, 2013 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) Link to comment Share on other sites More sharing options...
Izzyurrita Posted January 11, 2014 Share Posted January 11, 2014 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 More sharing options...
Izzyurrita Posted January 12, 2014 Share Posted January 12, 2014 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 Link to comment Share on other sites More sharing options...
indus Posted January 17, 2014 Share Posted January 17, 2014 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> Link to comment Share on other sites More sharing options...
Izzyurrita Posted January 17, 2014 Share Posted January 17, 2014 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 More sharing options...
mnick Posted February 2, 2014 Share Posted February 2, 2014 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. Link to comment Share on other sites More sharing options...
dzoxen Posted March 13, 2014 Share Posted March 13, 2014 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.. Link to comment Share on other sites More sharing options...
vekia Posted March 13, 2014 Share Posted March 13, 2014 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. 1 Link to comment Share on other sites More sharing options...
lordcracker Posted March 13, 2014 Share Posted March 13, 2014 (edited) 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 March 13, 2014 by lordcracker (see edit history) Link to comment Share on other sites More sharing options...
Rhapsody Posted March 13, 2014 Author Share Posted March 13, 2014 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 More sharing options...
Coyotee Posted March 31, 2014 Share Posted March 31, 2014 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 More sharing options...
clubvapea Posted April 17, 2014 Share Posted April 17, 2014 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 More sharing options...
killerrose Posted May 3, 2014 Share Posted May 3, 2014 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 More sharing options...
mtporter Posted July 25, 2014 Share Posted July 25, 2014 How do you hide voucher codes that need to be hidden from selected groups in 'My Vouchers'? Link to comment Share on other sites More sharing options...
Rosie Posy Posted September 26, 2014 Share Posted September 26, 2014 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 More sharing options...
jackbeanoffendsyou Posted November 18, 2014 Share Posted November 18, 2014 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 More sharing options...
remixs Posted October 3, 2017 Share Posted October 3, 2017 (edited) Wtf, why this topic is solved? Vouchers assigned to user, not work in 1.6.1.17 Edited October 3, 2017 by remixs (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts