Forums / Discounts/Coupons, Gift Certificates, Newsletters, Ads / 1054 Unknown column 'coupon_zone_restriction' in 'field list'

1054 Unknown column 'coupon_zone_restriction' in 'field list'

Locked

Views: 4,631

Results 1 to 17 of 17
This thread is locked. New replies are disabled.
29 Mar 2008, 6:00 PM
#1
tulameen avatar

tulameen

New Zenner

Join Date:
Sep 2006
Location:
eastern Washington State
Posts:
30
Plugin Contributions:
0

1054 Unknown column 'coupon_zone_restriction' in 'field list'

I apologize if there's a post about this, but I did a search and couldn't find one. I'm getting this error message: 1054 Unknown column 'coupon_zone_restriction' in 'field list' 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, 20] 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. Where do I go to fix that, and how do I make coupons work again? I'm running version 1.3.7. Thanks, Tulameen

. . . . . .
Water Lily Naturals
Celebrating your natural beauty!
https://www.waterlily-naturals.com

29 Mar 2008, 7:03 PM
#2
drbyte avatar

drbyte

Sensei

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

Re: 1054 Unknown column 'coupon_zone_restriction' in 'field list'

The coupon_zone_restriction field was added to the database during the upgrade from v1.3.5 to v1.3.6.
So, it would appear that you've got a mismatch between your PHP code and your database structure ... perhaps a failed or incomplete upgrade.

.
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 May 2008, 3:27 AM
#3
skruzich avatar

skruzich

New Zenner

Join Date:
Apr 2008
Posts:
29
Plugin Contributions:
0

Re: 1054 Unknown column 'coupon_zone_restriction' in 'field list'

DrByte:

The coupon_zone_restriction field was added to the database during the upgrade from v1.3.5 to v1.3.6.
So, it would appear that you've got a mismatch between your PHP code and your database structure ... perhaps a failed or incomplete upgrade.

Hey,
I have the same error tonight, and I started with 1.3.7 and just upgraded recently to the latest version.

HOw do i fix this??

thanks

1054 Unknown column 'coupon_zone_restriction' in 'field list'
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, 20]

13 May 2008, 3:33 AM
#4
drbyte avatar

drbyte

Sensei

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

Re: 1054 Unknown column 'coupon_zone_restriction' in 'field list'

You'll need to rerun the database upgrade steps for 1.3.5 to 1.3.6

.
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 May 2008, 10:21 AM
#5
skruzich avatar

skruzich

New Zenner

Join Date:
Apr 2008
Posts:
29
Plugin Contributions:
0

Re: 1054 Unknown column 'coupon_zone_restriction' in 'field list'

DrByte:

You'll need to rerun the database upgrade steps for 1.3.5 to 1.3.6

ok, is this going to be fixed so we don't have to do this later on. I just spent far too many hours on my database to screw around with losing it.

13 May 2008, 3:29 PM
#6
drbyte avatar

drbyte

Sensei

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

Re: 1054 Unknown column 'coupon_zone_restriction' in 'field list'

Sorry ... there's no "fix" needed to Zen Cart as a whole. Your situation appears to be a one-off unique case.

A fresh install of v1.3.6 or 1.3.7 or 1.3.8 or newer will automatically include the coupon_zone_restriction field in the coupons table.

Why yours is missing it is uncertain. Perhaps you installed an addon that changed something?

.
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 May 2008, 6:05 PM
#7
skruzich avatar

skruzich

New Zenner

Join Date:
Apr 2008
Posts:
29
Plugin Contributions:
0

Re: 1054 Unknown column 'coupon_zone_restriction' in 'field list'

DrByte:

Sorry ... there's no "fix" needed to Zen Cart as a whole. Your situation appears to be a one-off unique case.

A fresh install of v1.3.6 or 1.3.7 or 1.3.8 or newer will automatically include the coupon_zone_restriction field in the coupons table.

Why yours is missing it is uncertain. Perhaps you installed an addon that changed something?

Ok then how do i save all the work i put into my database and then do a fresh install. Heck, how do i do a fresh install and save all the modifications i made to my site without losing all of that.

14 May 2008, 4:37 AM
#8
drbyte avatar

drbyte

Sensei

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

Re: 1054 Unknown column 'coupon_zone_restriction' in 'field list'

Go to Admin->Tools->Server Information.

Copy and paste all the information from the top section (from version info down until the "php info" area starts) here.

.
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.

12 Jun 2009, 4:54 PM
#9
garby avatar

garby

New Zenner

Join Date:
May 2009
Posts:
48
Plugin Contributions:
0

Re: 1054 Unknown column 'coupon_zone_restriction' in 'field list'

I just found this error too, on a clean install 1.3.8 and my database was upgraded from 1.3.7 to 1.3.8

Any other advice?

12 Jun 2009, 7:08 PM
#10
ajeh avatar

ajeh

Oba-san

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

Re: 1054 Unknown column 'coupon_zone_restriction' in 'field list'

Still sounds like the same problem ...

You have Zen Cart v1.3.8 code ... but the database does not appear to have all of the fields ... :unsure:

Backup your database ...

Did you backup your database? :cool:

If you go to the /zc_installer and do an UPGRADE on the database and rerun the database upgrade steps for 1.3.5 to 1.3.6, as DrByte suggested ... do this correct the error?

NOTE: you may see some messages about things that could not be done as they have already been done ...

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!

13 Jun 2009, 4:07 AM
#11
garby avatar

garby

New Zenner

Join Date:
May 2009
Posts:
48
Plugin Contributions:
0

Re: 1054 Unknown column 'coupon_zone_restriction' in 'field list'

A quick question -

Since I did a clean install and am at database 1.3.8

If i do this and do the database 1.3.5 to 1.3.6 upgrade, do I continue the upgrade chain and then do 1.3.6 to 1.3.7 and then 1.3.7 to 1.3.8

Or is that I simply only do the 1.3.5 to 1.3.6 ?

It took forever to get the database to upgrade correctly to 1.3.8 so I don't want to mess it up. :dontgetit

13 Jun 2009, 4:21 PM
#12
ajeh avatar

ajeh

Oba-san

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

Re: 1054 Unknown column 'coupon_zone_restriction' in 'field list'

You have an older database that you think you upgraded to v1.3.8 ... and you have v1.3.8 code on your site ...

But, it is apparent that the upgrade either wasn't done or not complete ...

So, backup your database ...

Go to the /zc_install and UPGRADE the database ... and do the database 1.3.5 to 1.3.6 upgrade ...

After, if it says you need to upgrade something else, there are checkboxes that will be checked ...

Leave the 1st one that is checked, and unmark any others and do the UPGRADE ...

If there are more checked, continue this process, in order, doing one at a time in the ordered checked ...

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!

13 Jun 2009, 5:15 PM
#13
garby avatar

garby

New Zenner

Join Date:
May 2009
Posts:
48
Plugin Contributions:
0

Re: 1054 Unknown column 'coupon_zone_restriction' in 'field list'

Arrgh :no:

I went ahead with the 1.3.5 - 1.3.6 and sure enough it took care of the problem -BUT it then showed my database needed to be upgraded. Nothing was checked though. So I went ahead and checked the 1.3.6 - 1.3.7 and updated it and it showed that it went and processed.

I then went to 1.3.7 - 1.3.8 and I get this error. This was the error that took me so long to get the store up and running as it now shows the Database needs to be upgraded banner again.

1062 Duplicate entry 'Customers who have never completed a purchase' for key 2
in:
[INSERT INTO zen_query_builder (query_category, query_name, query_description , query_string) VALUES ('email,newsletters', 'Customers who have never completed a purchase', 'For sending newsletter to all customers who registered but have never completed a purchase', 'SELECT DISTINCT c.customers_email_address as customers_email_address, c.customers_lastname as customers_lastname, c.customers_firstname as customers_firstname FROM TABLE_CUSTOMERS c LEFT JOIN TABLE_ORDERS o ON c.customers_id=o.customers_id WHERE o.date_purchased IS NULL');]

13 Jun 2009, 5:37 PM
#14
ajeh avatar

ajeh

Oba-san

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

Re: 1054 Unknown column 'coupon_zone_restriction' in 'field list'

Did you get that during the upgrade?

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!

13 Jun 2009, 5:41 PM
#15
garby avatar

garby

New Zenner

Join Date:
May 2009
Posts:
48
Plugin Contributions:
0

Re: 1054 Unknown column 'coupon_zone_restriction' in 'field list'

It's OK Now!!

I had to look back at what I did to resolve this error before and and remembered I found the answer posted in the upgrade section that worked.

In case anyone runs into this I ran this in the Install SQL Patches Tool in Admin.

DELETE from query_builder where query_name = 'Customers who have never completed a purchase';

And as a side note my Advanced Search did not work properly and had an error code, and now it seems to be working great!

Thanks for all your help! :smile:

13 Jun 2009, 6:09 PM
#16
garby avatar

garby

New Zenner

Join Date:
May 2009
Posts:
48
Plugin Contributions:
0

Re: 1054 Unknown column 'coupon_zone_restriction' in 'field list'

Well it almost worked perfect.

I checked out the Advanced search in FireFox (Mac) and when I do this it highlights all my products, images, links, buy now buttons with a dashed border and background color on the links.

When I click on a product however and go to it's page the dashed border do not show on any further clicked pages.

It does not do this in Safari.

Only seems to be on the Advanced Search page (FireFox). :dontgetit

Update: It does this with a regular search too.

13 Jun 2009, 6:23 PM
#17
ajeh avatar

ajeh

Oba-san

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

Re: 1054 Unknown column 'coupon_zone_restriction' in 'field list'

Thanks for the update that this is now working ... :smile:

I think for the layout issues I'd post another thread on those ... it makes it a lot easier to keep track of questions and solutions that way ...

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!