Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Discount Coupons


apronsrus

Recommended Posts

I am hoping someone can help me here. I am not an experienced user at all. I am one of those try and figure it out on my own kinda people. But this one I can't seem to figure out.

 

I just installed discount coupons codes 1.4 dated 6/27 and did an update with fixed coupons.php dated 6/28

I followed the install instructions and everthing seemed to install correctly until I went to create a coupon in admin/catalog/discount coupons I receive this error.

 

Discount Coupons

 

Coupon Code: Discount: Start: End: Max Use: Min Order: Available:

1146 - Table 'databasename.TABLE_DISCOUNT_COUPONS' doesn't exist

 

select count(*) as total from TABLE_DISCOUNT_COUPONS cd

 

[TEP STOP]

 

I went to myphp used the sql tab to run quiery on this code

 

CREATE TABLE discount_coupons (

coupons_id VARCHAR(32) NOT NULL DEFAULT '',

coupons_description VARCHAR(64) NOT NULL DEFAULT '',

coupons_discount_percent DECIMAL(7,4) DEFAULT NULL,

date_start DATETIME DEFAULT NULL,

date_end DATETIME DEFAULT NULL,

max_use INT(3) NOT NULL DEFAULT 0,

min_order DECIMAL(15,4) NOT NULL DEFAULT '0.0000',

number_available INT(3) DEFAULT 0 NOT NULL,

PRIMARY KEY (coupons_id)

 

); CREATE TABLE discount_coupons_to_orders (

discount_coupons_to_orders_id INT(11) NOT NULL AUTO_INCREMENT,

coupons_id VARCHAR(32) DEFAULT NULL,

orders_id INT(11) DEFAULT '0',

PRIMARY KEY (discount_coupons_to_orders_id),

KEY coupons_id (coupons_id)

);

 

 

as per the install instructions.

 

If I go try to run it again it says the tables already exsist. But for some reason in my admin they are not showing up. should I have run them as 2 seperate tables? Does that matter?

 

Does anyone know what I did wrong?

 

Any help would be greatly appriciated

 

lorrie

Link to comment
Share on other sites

If you've excecuted the SQL query then the tables exist. Check that you entered the database tables into database_tables.php per the instructions? I don't think the database name is actually TABLE_DISCOUNT_COUPONS by memory (database_tables.php contains the actual database table names).

 

Peter

CE PHOENIX SUPPORTER

Support the Project, go PRO and get access to certified add ons

Full-time I am a C-suite executive of a large retail company in Australia. In my spare time, I enjoying learning about web-design.

Download the latest version of CE Phoenix from gitHub here

Link to comment
Share on other sites

If you've excecuted the SQL query then the tables exist. Check that you entered the database tables into database_tables.php per the instructions? I don't think the database name is actually TABLE_DISCOUNT_COUPONS by memory (database_tables.php contains the actual database table names).

 

Peter

 

Peter thanks for that tip. Here is what the code looks like in admin/includes/database_tables.php

 

line 28

//kgt - discount coupons

define('TABLE_DISCOUNT_COUPONS', 'discount_coupons');

define('TABLE_DISCOUNT_COUPONS_TO_ORDERS', 'discount_coupons_to_orders');

//end kgt - discount coupons

 

Is this wrong? am I missing some small discrepancy between the two?

 

thanks again

Link to comment
Share on other sites

Ok I finaly got the table to show. But now I have 2 problems.

1. For some reason my style sheets are not working onthe coupons page, it is very distorded and

2. When I go to create a coupon this is the error that I know receive.

 

1136 - Column count doesn't match value count at row 1

 

insert into discount_coupons ( coupons_id, coupons_description, coupons_discount_percent, date_start, date_end, max_use, min_order) values ('CJJ9MV', 'sale', '.25', null, null, 0, 0, 0)

 

[TEP STOP]

 

I don't really know where column count at row one is nor would I know what to do with it if I found it.

 

I left the coupon code space blank for a random generated code I also tried it with a code that I entered. I get the same error.

 

coupon name sale

discount .25

everything else left blank for no limits.

 

Any one have any ideas?

lorrie

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...