didnt work for us
-
we got the following error on the cart
[Incorrect DATETIME value: ''] SELECT * -- ,(SELECT GROUP_CONCAT(DISTINCT post_title) FROM wpl4_posts WHERE FIND_IN_SET(ID,product_ids)>0)product FROM ( SELECT p.ID post_id,post_title coupon_code ,(SELECT meta_value FROM wpl4_postmeta WHERE post_id=p.ID AND meta_key='product_ids' LIMIT 1)product_ids ,(SELECT meta_value FROM wpl4_postmeta WHERE post_id=p.ID AND meta_key='product_categories')category ,(SELECT meta_value FROM wpl4_postmeta WHERE post_id=p.ID AND meta_key='individual_use' LIMIT 1)individual ,(SELECT meta_value FROM wpl4_postmeta WHERE post_id=p.ID AND meta_key='coupon_amount' LIMIT 1)coupon_amount ,(SELECT meta_value FROM wpl4_postmeta WHERE post_id=p.ID AND meta_key='_wc_min_qty' LIMIT 1)min_qty ,(SELECT meta_value FROM wpl4_postmeta WHERE post_id=p.ID AND meta_key='_wc_max_qty' LIMIT 1)max_qty ,(SELECT meta_value FROM wpl4_postmeta WHERE post_id=p.ID AND meta_key='_wc_qty_ntf' LIMIT 1)qty_ntf ,(SELECT meta_key FROM wpl4_postmeta WHERE post_id=p.ID AND meta_key LIKE '_wc_%_apply' AND meta_value='yes' LIMIT 1)apply ,DATE_FORMAT(FROM_UNIXTIME(meta_value),'%m-%d-%Y')exp_date ,CASE WHEN FROM_UNIXTIME(meta_value)<NOW() THEN 1 ELSE 0 END exp FROM wpl4_posts p LEFT JOIN wpl4_postmeta x ON x.post_id=p.ID AND x.meta_key='date_expires' WHERE post_type='shop_coupon' AND post_status='publish' AND IFNULL(NULLIF(FROM_UNIXTIME(x.meta_value),''),NOW())>=NOW() )a WHERE(individual='yes' OR apply IS NOT NULL) ORDER BY exp,individual DESC,CAST(coupon_amount AS SIGNED) DESC;
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘didnt work for us’ is closed to new replies.