a_smith Posted March 31, 2015 Share Posted March 31, 2015 (edited) Hello PrestaTeam and all others.. :-) I have a problem reported here http://forge.prestashop.com/browse/PSCSX-5169?filter=-2 but no one developer from Presta Team has been interested to 'get in charge'. When customers exchange their loyalty points to vouchers, vaucher ,valid from' date is in far future like 10, 12 or even 18 month time..... So effectivelly those vouchers are useless and customers thinks that store admin is an idiot .... PS 1.6.0.14..... Edited March 31, 2015 by a_smith (see edit history) 1 Link to comment Share on other sites More sharing options...
tarmouti Posted June 18, 2015 Share Posted June 18, 2015 (edited) Refresh. I've found the same issue. Edited June 18, 2015 by tcovoc (see edit history) Link to comment Share on other sites More sharing options...
a_smith Posted June 18, 2015 Author Share Posted June 18, 2015 (edited) I have reported this issues on forge on 26 March http://forge.prestashop.com/browse/PSCSX-5169 NOT EVEN ONE reply from PS... For all the time report is unassigned to any dev..... eCommerce software without properly working vouchers. Nice solution. If customer have voucher from loyalty points and his not able to add it to cart thinks that store is playing dirty games (empty offer). Such customer is lost customer because he never be interested to purchase again. Edited June 18, 2015 by a_smith (see edit history) 1 Link to comment Share on other sites More sharing options...
tarmouti Posted June 18, 2015 Share Posted June 18, 2015 Refresh. What do you think about adding if statement similar to this one: https://github.com/maximebiloe/loyalty/commit/54099c9e17bbecb4da7d9e44d5394fc51e2efb4f The only difference is related to ">" instead of "<" if ($date_from > time()) $date_from = time(); Link to comment Share on other sites More sharing options...
a_smith Posted June 21, 2015 Author Share Posted June 21, 2015 Did you applied this to your store? Does it works for you? Link to comment Share on other sites More sharing options...
tarmouti Posted June 21, 2015 Share Posted June 21, 2015 I've sent you private msg. Give it a try on test environment . It turns the date correctly. Link to comment Share on other sites More sharing options...
a_smith Posted June 22, 2015 Author Share Posted June 22, 2015 Unfortunately : - my installation (1.6.0.14) doesnt have controllers/front/default.php - I have created the file and changed '<' to '>' but it doesnt worked. Still, vouchers are created with 'valid from' date in the future (like in a year time).... Link to comment Share on other sites More sharing options...
tarmouti Posted June 22, 2015 Share Posted June 22, 2015 Check full path modules/loyalty/controllers/front/default.php I'm sure that you have this file. Probably you've checked only controllers/front... Link to comment Share on other sites More sharing options...
a_smith Posted June 23, 2015 Author Share Posted June 23, 2015 Hi tcovoc! Oh yeah...! You are right. I was confused because path given on https://github.com/m...5394fc51e2efb4f says controllers/front/default.php. Sure, it is modules/loyalty/controllers/front/default.php. After adding this simple 'if' statement, vouchers 'valid from' date is right now (starts from the time of voucher creation). It is not very elegant solution but it works. And fixes this annoying bug which was pain in the *SS for me since January. Link to comment Share on other sites More sharing options...
Mister Denial Posted July 27, 2015 Share Posted July 27, 2015 I don't want to highjack your thread, but I think I might have stumbled unto a related issue: today I had a customer complain about his loyalty voucher being expired despite creating it only a few days ago. I checked, and according to the voucher details, it was created in 2013 and expired 2014. Yet, the voucher ID is the most recent number, so it is the last voucher loyalty voucher created. How can that happen? My theory is that maybe the customer converted an old order into a voucher which he never used, and a couple of days ago, converted his last order. The points did stack, but somehow the expire date from his initial voucher stuck. Could that be? I wanted to get the community feedback before reporting a bug on forge. Link to comment Share on other sites More sharing options...
tarmouti Posted July 27, 2015 Share Posted July 27, 2015 (edited) Your customer should still receive brand new voucher (from 07.2015). Try to fix it the same as I've mentioned before. In your case it's: if ($date_from < time())$date_from = time(); rather than: if ($date_from > time()) $date_from = time(); Edited July 27, 2015 by tcovoc (see edit history) Link to comment Share on other sites More sharing options...
Nyla C. Posted January 27, 2016 Share Posted January 27, 2016 It's because of your returns validity date. If for example, if you selected "max time after delivery for a customer to submit a return" to be 12 days, then for your protection, Prestashop does not allow customers to use converted vouchers until 12 days have passed. This prevents customers from making purchases, generating vouchers, receiving an order, and then returning it but still having a free voucher to use. You can fix this by going to Orders > Merchandise Returns > and selecting a new returns validity date. 2 Link to comment Share on other sites More sharing options...
morgane2014 Posted February 14, 2016 Share Posted February 14, 2016 Hello, I think I have the answer to all your questions. I've read the code. Here is the algorithm of dates in loyalty voucher creation: If Merchandise return is enabled (http://doc.prestashop.com/display/PS16/Merchandise+Returns) then start date = lastest customer order date + time limit of validity else start date = lastest customer order date @a_smith: in your case I think Merchandise return is more than one year (on my test environment default value was 1000 days). @Mister Denial: when was newest order of your customer ? regards Link to comment Share on other sites More sharing options...
totor321 Posted October 21, 2016 Share Posted October 21, 2016 Hi The post is a bit old but, i'm sure some people are still having the same problem... Clients who generate vouchers from loyalty program received vouchers valid from 1970 to 1971 I just added if ($date_from < time()) $date_from = time(); in the modules/loyalty/controllers/front/default.php line 92 it works perfectly. thanx a lot (PS1.6.1.4) Anne-Laure Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now