Site maintenance: Sun 15 Nov, from 12:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Coupon restriction error

Started by dre on 9 Mar 2011, 7:45 AM · Views: 2,262

Results 1 to 8 of 8
9 Mar 2011, 7:45 AM
#1
dre avatar

dre

New Zenner

Join Date:
Mar 2006
Location:
The Netherlands
Posts:
92
Plugin Contributions:
0

Coupon restriction error

I made a new discount coupon and wanted to restrict it to some products.

In english everything looks ok but in dutch im getting this error:

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 '-0, MAX_DISPLAY_RESTRICT_ENTRIES' at line 1
in:
[select * from coupon_restrict where coupon_id = '' and category_id != '0' limit -0, MAX_DISPLAY_RESTRICT_ENTRIES]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

I totally dont know what it is.

Further when i do a test order its giving the discount to all the products and not only to the products i restricted.

Hopefully someone can help me with this.

9 Mar 2011, 2:10 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Coupon restriction error

Check your language file for:
/your_secret_admin_dir/includes/languages/english/coupon_restrict.php

Line #27 : define('MAX_DISPLAY_RESTRICT_ENTRIES', 20);

Do you have that define around line 27?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

9 Mar 2011, 3:50 PM
#3
dre avatar

dre

New Zenner

Join Date:
Mar 2006
Location:
The Netherlands
Posts:
92
Plugin Contributions:
0

Re: Coupon restriction error

Thank you for your response!

Yes I have that in the english version

Is also saw that the dutch coupon_restrict.php is totally different???

9 Mar 2011, 3:54 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Coupon restriction error

And if you look at the language file that should contain this setting in:
/your_secret_admin_dir/includes/languages/english/coupon_restrict.php

Do you have that define around line 27 in the file? :unsure:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

9 Mar 2011, 4:02 PM
#5
dre avatar

dre

New Zenner

Join Date:
Mar 2006
Location:
The Netherlands
Posts:
92
Plugin Contributions:
0

Re: Coupon restriction error

On line 28 i have this:

define('MAX_DISPLAY_RESTRICT_ENTRIES', 20);

I also copied the english over the dutch and the databas error is gone . Only the restrictions are not working its giving discoutn to all products

9 Mar 2011, 4:09 PM
#6
dre avatar

dre

New Zenner

Join Date:
Mar 2006
Location:
The Netherlands
Posts:
92
Plugin Contributions:
0

Re: Coupon restriction error

I think I fixed it . Copied the english version over the dutch one and the database error is gone.

And the resctriction problem I had to disallow al categories and allow only the choosen products.

Thank you for your help !!!!

The strange thing was that the dutch version was totally different then the english

9 Mar 2011, 4:24 PM
#7
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Coupon restriction error

Thanks for the update that you now have this working ... :smile:

It could be that your language file was made from an older version or some other changes were made to it and left out some of the defines ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

30 Jun 2011, 9:09 AM
#8
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Coupon restriction error

I had the same problem as mentioned in the above posts. Fixed it by copying the missing lines to the Dutch version of the file. Th Dutch language pack is based on version 1.38a. So it apparently needs some extra updates besides the existing 1.39 update. We'll get it fixed on the Dutch forum