cerberus22 5 Posted March 4, 2009 Posted March 4, 2009 Hi all,When a customer converts his Loyalty points to a voucher they cannot use then straight away (the loyality voucher date starts 14 days after creation for some reason). how can I change this so the loyality voucher starts the same day (or the next day) from when the customer converts there loyality points to a voucher ?All the best,Cerberus22 Share this post Link to post Share on other sites
WODP 0 Posted March 4, 2009 Posted March 4, 2009 Try editing line: $dateFrom = $dateFrom + (60 * 60 * 24 * intval(Configuration::get('PS_ORDER_RETURN_NB_DAYS'))); in ./modules/loyalty/loyalty-program.php . Change numbers 60*60*24 to get desired date or change to: $dateFrom = $dateFrom or $dateFrom = $dateFrom + 0 .I'm not a programer, but this sounds logic solution Before trying, please make backup.Hope it helps,WODPEDIT: now i see it's for order return in code... i'll try something other in a while. Share this post Link to post Share on other sites
gleb 1 Posted May 12, 2010 Posted May 12, 2010 For anyone who experiences this problem the solution is this:In modules/loyalty/loyalty-program.php change this: $voucher->date_from = date('Y-m-d H:i:s', $dateFrom); To: $voucher->date_from = date('Y-m-d H:i:s', $dateFrom - 864000); // - 10 days With this the voucher will be active right away when the customer converts it in a voucher and doesn't have to wait 10 days.The value of 864000 are the seconds. So 60seconds * 60minutes * 24hours * 10days = 864000 seconds 1 Share this post Link to post Share on other sites
Babocas 0 Posted September 23, 2010 Posted September 23, 2010 The loyality voucher date starts 14 days after creation I think that's because a law thing. In EU the costumer has the right of return the purchase and no need to justify why in a 14 days period after recieve what has bought.I'm not sure if is that the reason but it makes sense. Imagine you have a costumer who bought some produts for 100€ and because of the loyalty program earns a 10€ voucher. In the same day the costumer buys again, other order of 10 € and subtract the voucher, so pays 0€. When the costumer recieves the firts order he decides to return it (in a 14 days period). So you give him the money back (100€). At the end, the costumer earned a 10€ voucher wich has discounted on the second order but actually did not deserve it because he returned the first order. How you will ask the 10€ voucher return?I think that's because the 14 days period exists in this module. Share this post Link to post Share on other sites
Evgeny 0 Posted October 26, 2010 Posted October 26, 2010 To my mind, this is a nice idea to protect the shop owner, but not very nice realisation which kills the loyality program. Let's say customer comes to a shop after a month he has bought something, remembers he has loyality points, go to menu and generates a voucher. Now he logically wants to use it, because he needs to buy something.. BUT HE CAN NOT!!! He needs to wait 14 days.. For sure he will just buy without a voucher and will never remember about it. To his mind voucher just didn't work!I think loyalty program/voucher should be connected to the of last purchase date, not to the date of voucher generation! Thank for the code modification guys. Share this post Link to post Share on other sites
Kt 2 Posted October 5, 2012 Posted October 5, 2012 Hi! How can you do this: After ordering the buyer accumulate points. Only after 5 orders points can be converted into a voucher. Share this post Link to post Share on other sites
Kt 2 Posted October 7, 2012 Posted October 7, 2012 does anyone know how to make loyalty points turned into a voucher after 5 orders? Share this post Link to post Share on other sites
vitoch 0 Posted June 19, 2015 Posted June 19, 2015 Try editing line: $dateFrom = $dateFrom + (60 * 60 * 24 * intval(Configuration::get('PS_ORDER_RETURN_NB_DAYS'))); in ./modules/loyalty/loyalty-program.php . Change numbers 60*60*24 to get desired date or change to: $dateFrom = $dateFromor $dateFrom = $dateFrom + 0 . I'm not a programer, but this sounds logic solution Before trying, please make backup. Hope it helps, WODP EDIT: now i see it's for order return in code... i'll try something other in a while. As I have understood this line $dateFrom = $dateFrom + (60 * 60 * 24 * intval(Configuration::get('PS_ORDER_RETURN_NB_DAYS'))); it says make that data from now + order return time it can be hours days month. How to provide actual date and time , as my system creates voucher and i have to wait about 8 hours where order return configuration is? Might it will help without editing lines? Share this post Link to post Share on other sites
Recommended Posts