Forums / Discounts/Coupons, Gift Certificates, Newsletters, Ads / Module_order_total_coupon_include_error

Module_order_total_coupon_include_error

Locked

Views: 1,754

Results 1 to 13 of 13
This thread is locked. New replies are disabled.
1 Mar 2010, 2:33 AM
#1
redradar avatar

redradar

New Zenner

Join Date:
Mar 2006
Location:
San Francisco, CA
Posts:
44
Plugin Contributions:
0

Module_order_total_coupon_include_error

Zen Cart 1.3.7 - Upgrade
Patch: 1::
Database Patch Level: 1.3.7
Database: MySQL 5.0.88
Add Ons: Simple SEO URL
Installing locally on Windows Vista

I have installed the Order Total module. In red caps next to Discount Coupon it states "MODULE_ORDER_TOTAL_COUPON_INCLUDE ERROR".

It gives me the option to remove or edit it. How would I correct it?

Discount Coupon

This module is installed
true

Sort Order
280

Include Shipping
false

Include Tax
true

Re-calculate Tax
Standard

Tax Class
--none--

When I go to Coupon Administration in Gift Certificate/Coupons, under Discount Coupons it states:

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

I have checked Google for this syntax and nothing comes up in a search. I checked Zen Cart forum and there is nothing I can find on this problem.

I then downloaded the full version of 1.3.7.1 and FPTed the following files to the corresponding directories in case I have a corrupted file (found coupon_id in each of the following documents using Developers Tool Kit so tried updating these files):

www/catalog/admin/coupon_admin.php
www/catalog/includes/modules/order_total/ot_coupon.php
www/catalog/includes/modules/order_total/ot_gv.php
www/catalog/includes/modules/pages/gv_redeem/header_php.php
www/catalog/admin/includers/languages/english/coupon_admin.php
www/catalog/includes/modules/pages/discount_coupon/header_php.php
www/catalog/includes/templates/template_default/popup_coupon_help/tpl_main_page.php

It didn't make any difference. Everything displays exactly the way it did prior to me FTPing the files to the server.

Mail Gift Certificates Queue, Mail Gift Certificates, and Gift Certificates Sent all display and work properly. However, Coupon Administration has never displayed properly and I have never been able to use it. Our customers keep asking for discount coupons but we can only administer gift certificates, and not coupons. How can I fix this?

(I would consider reinstalling the whole module but we have two pages of Gift Certificates Sent with some still outstanding, and I'm concerned that I might inadvertently wipe out that information.)

Thank you in advance for any enlightenment you can give.

1 Mar 2010, 4:02 AM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Module_order_total_coupon_include_error

What version of Zen Cart did you start with?

coupon_zone_restriction

was added in v1.3.6 ... it sounds like you are either using a database that was not upgraded or lost a field somewhere ... :blink:

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!

1 Mar 2010, 5:27 PM
#3
redradar avatar

redradar

New Zenner

Join Date:
Mar 2006
Location:
San Francisco, CA
Posts:
44
Plugin Contributions:
0

Re: Module_order_total_coupon_include_error

I started with Version 1.2.7. I've never been able to use Coupon Administration; seems like it's always had this problem for us. I had hoped that when we upgraded to a new Zen Cart version that this problem would resolve itself but unfortunately that has not been the case.

Is this problem resolvable?

1 Mar 2010, 7:44 PM
#4
ajeh avatar

ajeh

Oba-san

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

Re: Module_order_total_coupon_include_error

Backup your database ...

Then, you might try the /zc_install and see if the Update Database shows any updates are needed ...

This may or may not correct the problem, but if you see checkboxes on updates, start with just the first checkbox and apply the updates and keep rechecking and applying each one that is checked one by one ...

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!

21 Mar 2010, 5:41 AM
#5
redradar avatar

redradar

New Zenner

Join Date:
Mar 2006
Location:
San Francisco, CA
Posts:
44
Plugin Contributions:
0

Re: Module_order_total_coupon_include_error

Thank you, Linda. I ran the /zc_install on it and am currently on Version 1.3.8a. There are no remaining check boxes on updates. However, nothing has changed with Coupon Administration. Do you have any other suggestions as to how I can fix it?

Even though /zc_install tells me I have the most current version and there's no need to upgrade, the administrative area of our site still denotes "New Version Available v1.3.8 :: Important Security Patch Download Here". Don't know if this is indicative of a problem or not.

21 Mar 2010, 5:47 AM
#6
drbyte avatar

drbyte

Sensei

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

Re: Module_order_total_coupon_include_error

Redradar:

Even though /zc_install tells me I have the most current version and there's no need to upgrade, the administrative area of our site still denotes "New Version Available v1.3.8 :: Important Security Patch Download Here". Don't know if this is indicative of a problem or not.
All forum members were emailed back in July 2009 about an important admin security patch. If you've not applied it yet, you'll still get the warnings in your admin area.
http://www.zen-cart.com/forum/showthread.php?t=130161
http://www.zen-cart.com/forum/showthread.php?t=131115
http://www.zen-cart.com/forum/announcement.php?f=2&a=14

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

22 Mar 2010, 9:29 PM
#7
redradar avatar

redradar

New Zenner

Join Date:
Mar 2006
Location:
San Francisco, CA
Posts:
44
Plugin Contributions:
0

Re: Module_order_total_coupon_include_error

Thank you for the links. Since we don't sell music or downloads I have deleted the extraneous folders as suggested.

We updated to patch 1.3.8 back in July as notified but the exhortation to apply the patch still shows in our (renamed) admin area. So I found this particular issue addressed in this thread:
http://www.zen-cart.com/forum/showthread.php?t=109226

I checked our server information:

Zen Cart 1.3.7
Patch: 1::
Database Patch Level: 1.3.8
v1.3.7 [2007-04-02 14:19:49] (Version Update 1.3.6->1.3.7)
v1.3.5 [2006-09-19 18:17:08] (Version Update 1.3.0.2->1.3.5)
v1.3.0.2 [2006-09-19 18:17:06] (Version Update 1.3.0.1->1.3.0.2)
v1.3.0.1 [2006-09-19 18:17:06] (Version Update 1.3.0->1.3.0.1)
v1.3.0 [2006-09-19 18:17:06] (Version Update 1.2.7->1.3.0)
v1.2.7 [2006-03-28 19:46:10] (Fresh Installation)

PHP Version 5.2.13

So apparently I didn't update the rest of Zen Cart to 1.3.8 yet. The /zc_install that I recently ran on the site was from version 1.3.8.

However, I'm noticing that a new version (1.4?) is due to come out soon. Would it be safe to wait until then (since I already have applied the latest patch) and update the rest of Zen Cart then? According to /zc_install our database is already at 1.3.8.

Still wondering if there's anything I can do to correct the problem with Coupon Administration. Do you think upgrading from 1.3.7 to 1.3.8 or 1.4 would fix that?

22 Mar 2010, 10:24 PM
#8
drbyte avatar

drbyte

Sensei

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

Re: Module_order_total_coupon_include_error

Okay, so going back to the original issue you posted ... clearly you're missing language definitions or that BIG UGLY ALL-CAPS CONSTANT NAME wouldn't be showing instead of the text it's supposed to be defined for. That could be a result of not doing upgrades in their entirety ... ie: skipping or missing certain .php files etc.

You'll need to compare ALL your site's files against a clean set of v1.3.7 (since you're using v1.3.7) files and reconcile all the differences you encounter. The process is described many places, but here's one: http://www.zen-cart.com/wiki/index.php/Troubleshoot_-_Diagnosing_Obscure_Issues

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

23 Mar 2010, 4:05 AM
#9
redradar avatar

redradar

New Zenner

Join Date:
Mar 2006
Location:
San Francisco, CA
Posts:
44
Plugin Contributions:
0

Re: Module_order_total_coupon_include_error

Thank you. Now I'm no longer getting the "MODULE_ORDER_TOTAL_COUPON_INCLUDE ERROR" in red caps next to Discount Coupon.

However I'm still getting the same:

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

When comparing clean versions of admin/coupon_admin.php and the admin/coupon_admin.php on our site in WinMerge something strange happened. Both files appear absolutely identical yet the entire files are highlighted in yellow as if they were totally different. How weird!

This is also the case when comparing:

admin/includes/languages/english/coupon_admin.php
includes/modules/order_total/ot_coupon.php
includes/modules/pages/discount_coupon/header_php.php

I FTPed the clean version of admin/coupon_admin.php to the server but even after doing that the files are slightly different sizes. The clean file is 65845 and the same file on the server is 64658, no matter how many times I FTP it. Also I notice when both files are open for comparison in WinMerge that the clean file indicates "Win" and the file from the server indicates "Unix". Would this have something to do with it? FTPing clean versions of the four files mentioned above does not solve the problem.

23 Mar 2010, 10:05 AM
#10
drbyte avatar

drbyte

Sensei

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

Re: Module_order_total_coupon_include_error

Redradar:

However I'm still getting the same:

"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 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."
That's a problem with a missing field (aka column) in the database. This suggests that you missed one (and if you missed at least one then you likely missed lots more) or more steps of the database upgrade during one or more of your upgrades done to your site.

For example, the 1.3.5-to-1.3.6 upgrade made numerous changes to the coupon tables, as well as metatags handling, product navigation filter settings, many new admin switches, and more.

Note in your previous post you posted evidence of the fact that you didn't actually do/complete the 1.3.5-to-1.3.6 database-upgrade step.

If you're missing several settings, then you have what we call a mess.
Fixing it is not something easily done in a few forum posts. It really requires some database skill and lots of patience, and a few hours to go through everything and fix whatever is broken. That should be followed by several hours of also re-evaluating every .php file to be sure they're all actually upgraded properly as well.

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

23 Mar 2010, 8:12 PM
#11
redradar avatar

redradar

New Zenner

Join Date:
Mar 2006
Location:
San Francisco, CA
Posts:
44
Plugin Contributions:
0

Re: Module_order_total_coupon_include_error

So apparently comparing clean 1.3.7 files to what we have on the server isn't going to resolve this problem if it's a database 1.3.5 to 1.3.6 problem. /zc_install tells me we are current on the database to 1.3.8. There are no unchecked checkboxes. Everything else works just fine on the site as far as we can tell.

I have the patience but obviously not the skills for this job. Thank you for your help and we'll just continue using it the way it's been so far.

23 Mar 2010, 9:32 PM
#12
drbyte avatar

drbyte

Sensei

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

Re: Module_order_total_coupon_include_error

Thinking about it further ...

You could try (after first making a good database backup) to manually run the /zc_install/sql/mysql_upgrade_135_to_136.sql file contents either via phpMyAdmin or via the SQL Patch tool in your admin. You'll likely see several errors, but hopefully none will be problematic.
If it finishes running then the database-upgrade steps in your Admin->Tools->Server Info page should show the 135-to-136 step as having been done today. In that case, maybe the errors you've been talking about might go away.

Without going and studying the code and simulating your situation, it's difficult to determine whether any dependencies exist in the 136-to-137 upgrade which might have failed due to your missing 135-to-136 step. But that's a bridge to cross later.

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

20 Apr 2010, 2:16 AM
#13
redradar avatar

redradar

New Zenner

Join Date:
Mar 2006
Location:
San Francisco, CA
Posts:
44
Plugin Contributions:
0

Re: Module_order_total_coupon_include_error

I manually updated the database as suggested.

Zen Cart 1.3.7
Patch: 1::
Database Patch Level: 1.3.7
v1.3.6 [2010-04-19 21:38:52] (Version Update 1.3.5->1.3.6)
v1.3.8 [2010-03-05 23:35:40] (Version Update 1.3.7->1.3.8)
v1.3.7 [2007-04-02 14:19:49] (Version Update 1.3.6->1.3.7)
v1.3.5 [2006-09-19 18:17:08] (Version Update 1.3.0.2->1.3.5)
v1.3.0.2 [2006-09-19 18:17:06] (Version Update 1.3.0.1->1.3.0.2)
v1.3.0.1 [2006-09-19 18:17:06] (Version Update 1.3.0->1.3.0.1)
v1.3.0 [2006-09-19 18:17:06] (Version Update 1.2.7->1.3.0)
v1.2.7 [2006-03-28 19:46:10] (Fresh Installation)

Coupon Administration now appears to work! Hooray! Thank you so much for your suggestion. I've created a test coupon and will let you know if there are any further developments. I truly appreciate your help; thanks again!