News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Big problem with "coupon"

Started by jhautier, April 30, 2015, 23:19:46 PM

Previous topic - Next topic

jhautier

Hi,

Il have a big problem when I test a "coupon" on my shop (Joomla 3.4.1 and Virtuemart 3.0.8).

I have the error:

"1305
FUNCTION the name of my database.IFNULL does not exist SQL=SELECT IFNULL( NOW() >= `coupon_start_date` OR `coupon_start_date`="0000-00-00 00:00:00" , 1 ) AS started , `coupon_start_date` , IFNULL (`coupon_expiry_date`!="0000-00-00 00:00:00" and NOW() > `coupon_expiry_date`,0) AS `ended` , `coupon_expiry_date` , `coupon_value_valid` , `coupon_used` FROM `c94aw_virtuemart_coupons` WHERE `coupon_code` = "the name of my coupon"

I test to update my Virtuemart tables, but the problem is not solved.

I can't find a solution at the moment... can you help me please.

Thanks a lot :-)

Regards,

Jérôme

PS: sorry for my bad english... I am french :-)

jhautier

Hi,

I found the solution on internet:

The problem is about a space that have to be deleted in "coupon.php" :

/components/com_virtuemart/helpers/coupon.php

Line 54 : delete just the space between IFNULL and ('

So need to replace :

Quote, IFNULL (`coupon_expiry_date`!="0000-00-00 00:00:00" and NOW() > `coupon_expiry_date`,0) AS `ended`

BY:

Quote, IFNULL(`coupon_expiry_date`!="0000-00-00 00:00:00" and NOW() > `coupon_expiry_date`,0) AS `ended`

Hope that will help others users...  :)


Best regards,

Jérôme