Jump to content

Customer Loyalty & Rewards vouchers are not valid, need to change the start date but how?


Recommended Posts

I have been using the customer loyalty and rewards module from Prestashop and when my customers redeem their points for a voucher, the vouchers start date is a month or more in the future so they are not able to use the voucher right away.

 

I do not see any settings that control this in the module configuration.   Does anybody know of a way to make these vouchers available immediately?  

 

This is really upsetting a lot of my customers.

Link to comment
Share on other sites

Try this, not tested be warned, so make backups. Delete or comment out 

$dateFrom = Db::getInstance()->getValue('
	SELECT UNIX_TIMESTAMP(date_add) n
	FROM '._DB_PREFIX_.'loyalty
	WHERE id_cart_rule = 0 AND id_customer = '.(int)$cookie->id_customer.'
	ORDER BY date_add DESC');
	if (Configuration::get('PS_ORDER_RETURN'))
		$dateFrom += 60 * 60 * 24 * (int)Configuration::get('PS_ORDER_RETURN_NB_DAYS');

and  add 

$dateFrom = date('Y-m-d H:i:s');

That should get current date.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...