Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Direct Download & Coupon Error


shankscomp

Recommended Posts

I keep getting this error when using an item that has the option for direct download...

 

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'or z2g.zone_id = 0 or z2g.zone_id IS NULL ) ' at line 5

 

SELECT dc2z.geo_zone_id FROM discount_coupons_to_zones dc2z LEFT JOIN zones_to_geo_zones z2g USING( geo_zone_id ) WHERE ( z2g.zone_id= or z2g.zone_id = 0 or z2g.zone_id IS NULL ) AND ( z2g.zone_country_id= or z2g.zone_country_id = 0 ) AND dc2z.coupons_id="ebay"

 

Where should I be looking???

 

 

ALSO, is it possible to have an item, where the customer can choose either CD format or Download format for an item???

 

Thanks

Tim

Link to comment
Share on other sites

Might be worth passing over the values you are searching for to mysql

 

z2g.zone_id= or z2g.zone_id = 0

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

I have a similar problem with this bit of SQL

 

SELECT dc2z.geo_zone_id FROM discount_coupons_to_zones dc2z LEFT JOIN zones_to_geo_zones z2g USING( geo_zone_id ) WHERE ( z2g.zone_id=0 or z2g.zone_id = 0 or z2g.zone_id IS NULL ) AND ( z2g.zone_country_id=222 or z2g.zone_country_id = 0 ) AND dc2z.coupons_id="abc-123"

 

does discount_coupons_to_zones (dc2z) have a column called geo_zone_id OR zone_id (or both).

 

As far as I can see there should be only zone_id for that table, this causes the sataement above to crash.

 

Could someone submit a result from

 

desc discount_coupons_to_zones;

 

from a working installation.

 

My installation almost works but doesn't show the order total - discount. Seems to be a propblem in

 

checkout_confirmation.php

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...