If this is your first visit, check our documentation. To post, register or login.
Forums / Code Matters / Bug Reports / discount coupon admin error

discount coupon admin error

Started by headache on 13 Jul 2011, 11:31 AM · Views: 1,173

Results 1 to 5 of 5
13 Jul 2011, 11:31 AM
#1
headache avatar

headache

New Zenner

Join Date:
Sep 2011
Posts:
79
Plugin Contributions:
0

discount coupon admin error

i have three shops all running latest 1.3.9h, perfectly (it seems).

decided to turn on discount coupon module and use it but i have an error come up when i go to coupon admin:

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, 0' at line 1
in:
[select coupon_id, coupon_code, coupon_amount, coupon_type, coupon_start_date,coupon_expire_date,uses_per_user,uses_per_coupon,restrict_to_products, restrict_to_categories, date_created,date_modified, coupon_active, coupon_zone_restriction from zen_coupons where coupon_active='Y' and coupon_type != 'G' limit -0, 0]
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've already done a search and not found an answer.

mysql version is 5.1.56

can anyone help me please? what file do i need to change and where is it?

13 Jul 2011, 12:35 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: discount coupon admin error

Simple.
Admin->Configuration->Maximum Values
You have blank or zero values there.
There should be no 0 or blank values there, except in the two cases where 0 is presented as a choice or explained in the instructions next to the input box.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

13 Jul 2011, 1:00 PM
#3
headache avatar

headache

New Zenner

Join Date:
Sep 2011
Posts:
79
Plugin Contributions:
0

Re: discount coupon admin error

thanks, i checked max values but couldn't really find anything that looked like it needed changing.

so i looked at gv coupons and saw max discounts per page was at 0.

changed that to 1 and the error disappears.

maybe you guys can build in a feature so when coupons gets switched on, it automatically defaults to more than 0 in gv coupons?

would be nicer to work without errors when its first switched on...

cheers anyway :~)

13 Jul 2011, 3:10 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: discount coupon admin error

The default value for that is 20 on a fresh install. No errors there.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

13 Jul 2011, 3:40 PM
#5
wilt avatar

wilt

Oji-san

Join Date:
Jun 2003
Location:
Newcastle UK
Posts:
1,950
Plugin Contributions:
3

Re: discount coupon admin error

Moved to Bug Reports. To action.