Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Discount Module


w_alpha69

Recommended Posts

I hope someone can help me here!

 

I had a "So Called Expert" install a Discount Module so I could give Group and Individual Discounts, but he could not get it to work. Basically I am unable to "CHECKOUT" when logged in because the following error comes up and I do not know where to start to fix the error.

 

1054 - Unknown column 'customers_group_id' in 'field list'

 

select customers_group_id from customers where customers_id = '3'

 

[TEP STOP]

 

Should I have a file in oscommerce or the discount module which is customers_group_id.php ? and if so where do I find it. If not what do I do.

 

Regards,

 

Wayne

Link to comment
Share on other sites

I hope someone can help me here!

 

I had a "So Called Expert" install a Discount Module so I could give Group and Individual Discounts, but he could not get it to work. Basically I am unable to "CHECKOUT" when logged in because the following error comes up and I do not know where to start to fix the error.

 

1054 - Unknown column 'customers_group_id' in 'field list'

 

select customers_group_id from customers where customers_id = '3'

 

[TEP STOP]

 

Should I have a file in oscommerce or the discount module which is customers_group_id.php ? and if so where do I find it. If not what do I do.

 

Regards,

 

Wayne

 

I am not familiar with that particular contribution, however the error you are receiving is a database error. The system is not finding the "customers_group_id" column in the customers table. That is not a column in the customers table by default, therefore its likely one that is added to the table as part of the installation of the contribution.

 

It appears the database did not receive all or some of the updates requiired. If you are not familiar with the system it will be tricky to find the problems. However a place to start would be to try and locate the particular contribution, walk through the installation instructions and try to determine what steps may or may not have been performed.

 

Be well,

Tina

If you're not having fun you're not doing it right

 

Teach a person to fish rather than give them a loaf of bread or however that saying goes.

Link to comment
Share on other sites

I am not familiar with that particular contribution, however the error you are receiving is a database error. The system is not finding the "customers_group_id" column in the customers table. That is not a column in the customers table by default, therefore its likely one that is added to the table as part of the installation of the contribution.

 

It appears the database did not receive all or some of the updates requiired. If you are not familiar with the system it will be tricky to find the problems. However a place to start would be to try and locate the particular contribution, walk through the installation instructions and try to determine what steps may or may not have been performed.

 

Be well,

Tina

 

 

 

Thanks Tina,

 

I'll give it a go, so should I be editing the file = customers table, I did place the call to the discount module in there manaully thinking I was on the right track, but then I thought I must be missing a file as it appeared to be looking for Customers_group_id.

 

Wayne

Link to comment
Share on other sites

Thanks Tina,

 

I'll give it a go, so should I be editing the file = customers table, I did place the call to the discount module in there manaully thinking I was on the right track, but then I thought I must be missing a file as it appeared to be looking for Customers_group_id.

 

Wayne

 

Ok "customers table" is not a file, it an object in your database. The only way to answer what you should be editing is to find the contribution. Often times a contribution will place flower boxes or other commented note on the sections of code that are added. You might look for something like that in some of you files, it may provide a clue to the identification of the contribution.

 

Be well,

Tina

If you're not having fun you're not doing it right

 

Teach a person to fish rather than give them a loaf of bread or however that saying goes.

Link to comment
Share on other sites

Ok "customers table" is not a file, it an object in your database. The only way to answer what you should be editing is to find the contribution. Often times a contribution will place flower boxes or other commented note on the sections of code that are added. You might look for something like that in some of you files, it may provide a clue to the identification of the contribution.

 

Be well,

Tina

 

I think this is required:

 

DROP TABLE IF EXISTS customers_groups;

CREATE TABLE customers_groups (

customers_groups_id INT(11) NOT NULL AUTO_INCREMENT,

customers_groups_name VARCHAR(32) NOT NULL DEFAULT '',

customers_groups_discount DECIMAL(8,2) NOT NULL DEFAULT '-0',

PRIMARY KEY (customers_groups_id)

) TYPE=MyISAM;

 

INSERT INTO customers_groups VALUES (1, 'Default', '-0.00');

INSERT INTO customers_groups VALUES (2, 'WholeSale', '-20.00');

 

ALTER TABLE customers ADD customers_groups_id INT( 11 ) DEFAULT '1' NOT NULL;

 

 

but your error gives a different column name (missing s in group):

 

1054 - Unknown column 'customers_group_id' in 'field list'

Treasurer MFC

Link to comment
Share on other sites

I think this is required:

 

DROP TABLE IF EXISTS customers_groups;

CREATE TABLE customers_groups (

customers_groups_id INT(11) NOT NULL AUTO_INCREMENT,

customers_groups_name VARCHAR(32) NOT NULL DEFAULT '',

customers_groups_discount DECIMAL(8,2) NOT NULL DEFAULT '-0',

PRIMARY KEY (customers_groups_id)

) TYPE=MyISAM;

 

INSERT INTO customers_groups VALUES (1, 'Default', '-0.00');

INSERT INTO customers_groups VALUES (2, 'WholeSale', '-20.00');

 

ALTER TABLE customers ADD customers_groups_id INT( 11 ) DEFAULT '1' NOT NULL;

but your error gives a different column name (missing s in group):

 

1054 - Unknown column 'customers_group_id' in 'field list'

 

 

Exactly that "I am missing the 's' from group, everything points to the plural Groups.

 

The ERROR say's Group, but if I change the other files to GROUPS it is even worse. But I cannot find a reference to 'customers_group_id' in 'field list' anywhere in the table customers etc. If I could find where this is all I would have to do is change it to read groups instead of group, is this correct?

 

Regards,

 

Wayne

Link to comment
Share on other sites

Exactly that "I am missing the 's' from group, everything points to the plural Groups.

 

The ERROR say's Group, but if I change the other files to GROUPS it is even worse. But I cannot find a reference to 'customers_group_id' in 'field list' anywhere in the table customers etc. If I could find where this is all I would have to do is change it to read groups instead of group, is this correct?

 

Regards,

 

Wayne

 

well, I would download the contrib again and go over the install instructions again to see if all was done as stated.

Treasurer MFC

Link to comment
Share on other sites

well, I would download the contrib again and go over the install instructions again to see if all was done as stated.

 

 

Thanks!

Already did that, but I think the problem is in another file and NOT the contrib. I even rechecked the suggested changes to the files and all was good.

 

Thanks for all the help guys.

 

Wayne

Link to comment
Share on other sites

Thanks!

Already did that, but I think the problem is in another file and NOT the contrib. I even rechecked the suggested changes to the files and all was good.

 

Thanks for all the help guys.

 

Wayne

 

 

they probably made a typing error so go to the file where the error occurs: login.php for instance and search for customers_group_id, if that is there in a query definition, add an s and see if that helps.

Treasurer MFC

Link to comment
Share on other sites

they probably made a typing error so go to the file where the error occurs: login.php for instance and search for customers_group_id, if that is there in a query definition, add an s and see if that helps.

 

 

 

 

Thank you, I'll try it now!

 

Wayne

Link to comment
Share on other sites

Thank you, I'll try it now!

 

Wayne

 

 

Thank you, I'll try it now! the error occurs in checkout_shipping.php and I have checked this file using edit find and replace, I guess it is in some other file somewhere. But to find it seems to be a luckdip, as I would have to open and check every file in the Catalog. I just thought someone might know where to look befor I start fossiking.

 

Wayne

Link to comment
Share on other sites

Thank you, I'll try it now! the error occurs in checkout_shipping.php and I have checked this file using edit find and replace, I guess it is in some other file somewhere. But to find it seems to be a luckdip, as I would have to open and check every file in the Catalog. I just thought someone might know where to look befor I start fossiking.

 

Wayne

 

includes/classes/currencies.php

includes/classes/shopping_cart.php

Treasurer MFC

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...