Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Need help with Discount for members contrib


mark w

Recommended Posts

for instance, above the categories list it now says, "BOX_HEADING_CATEGORIES", above the what's new box, says the same thing but for _WHATS_NEW.

 

This is one of my problems. I just installed the Customer Specific Discount and followed the instructions, minus the line that says

 

"* You need to add one field to the customers table. Here is the SQL statement that

would accomplish this :

 

ALTER TABLE customers ADD customer_discount DECIMAL(5,2) DEFAULT '0' NOT NULL;"

 

I'm not sure how to do this exactly, maybe someone can point me in the right direction on how to edit the MySQL DB.

 

Also, I updated to the admin members discount that lets you edit each member's discount from the admin page instead of going into the Database. So everything shows up now but when I go to edit my dummy member, John Doe, I get this message:

 

---------------------------------------------------------

1054 - Unknown column 'c.member_flag' in 'field list'

 

select c.customers_gender, c.customers_firstname, c.customers_lastname, c.customers_dob, c.customers_email_address, a.entry_company, a.entry_street_address, a.entry_suburb, a.entry_postcode, a.entry_city, a.entry_state, a.entry_zone_id, a.entry_country_id, c.customers_telephone, c.customers_fax, c.customers_newsletter, c.member_flag, c.customers_default_address_id from customers c left join address_book a on c.customers_default_address_id = a.address_book_id where a.customers_id = c.customers_id and c.customers_id = '1'

 

[TEP STOP]

-------------------------------------------------------------------

 

 

Any help would be appreciated.

 

-mark

Link to comment
Share on other sites

the error is caused because you do have a field in the db called

"member_flag"

 

That line you memtioned adds it

 

There are a number of programs ou there that will let you add the feild to the DB one of them is phpmyadmin at http://phpmyadmin.net

 

Many web host install this for you.

 

From within phpmyadmin is an area that allows you to run sql, copy and paste the line and it should add it.

Link to comment
Share on other sites

thank you zip. I followed your advice and used the query line given in the text file in the phpMyAdmin that our webserver provides. It said it was successful. But I still get the same exact message when I tried to edit an account I created under my name. Although I'm positive I followed the php editing directions given in both packages, I suppose I could go over them again, but i'm about 99% sure I did them right, since this was about the 3rd time I've done them to a fresh osCommerce install. So do you have any new suggestions about this error? thanks.

 

-mark

Link to comment
Share on other sites

That error means exactly what it says, the database doesn't have the field installed in it, so check it again :)

 

Go the the customer table and see if the field is there. It isn't.

[no external urls in signatures please, kthanks]

Link to comment
Share on other sites

ALTER TABLE customers ADD customer_discount DECIMAL(5,2) DEFAULT '0' NOT NULL

 

Go to your database and paste that line into your sql query editor and hit enter.

[no external urls in signatures please, kthanks]

Link to comment
Share on other sites

loxly, did it again, but I had to delete the customer_discount field that already existed because it game me this error

 

Error

 

SQL-query :

 

ALTER TABLE customers ADD customer_discount DECIMAL( 5, 2 ) DEFAULT '0' NOT NULL

 

MySQL said:

 

 

Duplicate column name 'customer_discount'

 

 

 

 

so after I dropped that field, I pasted your query request and it said executed successfully, went to the oscommerce cart-> customers->my account-> edit and got the same error:

 

1054 - Unknown column 'c.member_flag' in 'field list'

 

select c.customers_gender, c.customers_firstname, c.customers_lastname, c.customers_dob, c.customers_email_address, a.entry_company, a.entry_street_address, a.entry_suburb, a.entry_postcode, a.entry_city, a.entry_state, a.entry_zone_id, a.entry_country_id, c.customers_telephone, c.customers_fax, c.customers_newsletter, c.member_flag, c.customers_default_address_id from customers c left join address_book a on c.customers_default_address_id = a.address_book_id where a.customers_id = c.customers_id and c.customers_id = '2'

 

 

 

-mark

Link to comment
Share on other sites

It sounds like you have 2 databases. that is the only explanation I have for you. You said you looked and it wasn't there, and then you did the insert and it was there.

 

Ask your host what is going on, this isn't a problem we can resolve for you.

[no external urls in signatures please, kthanks]

Link to comment
Share on other sites

Hi, Loxly,

 

Pls, provide me the SQL command to add the member_flag filed in the table. It is not exists by default. and nothing about it in the modules instalation instruction

 

Or, if I am mistaken, just tell me at what the module installation step this field should will appear

 

Thanks

Link to comment
Share on other sites

  • 2 months later...

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