Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

Since I cannot upload the sql file through phpMyAdmin, I have to manually define the tables and fields. I have figured out how to make the rest of the tables, however, the modification to the configuration table has me stumped. What from the below statements am I supposed to be placing in these fields (Field, Type, Length/Values, Attributes, Null, Default, Extra)?

 

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('Welcome Gift Voucher Amount', 'NEW_SIGNUP_GIFT_VOUCHER_AMOUNT', '0', 'Welcome Gift Voucher Amount: If you do not wish to send a Gift Voucher in your create account email put 0 for no amount else if you do place the amount here i.e. 10.00 or 50.00 no currency signs', 1, 31, NULL, '2003-12-05 05:01:41', NULL, NULL);

 

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('Welcome Discount Coupon Code', 'NEW_SIGNUP_DISCOUNT_COUPON', '', 'Welcome Discount Coupon Code: if you do not want to send a coupon in your create account email leave blank else place the coupon code you wish to use', 1, 32, NULL, '2003-12-05 05:01:41', NULL, NULL);

 

 

Thank you for your assistance,

Barbara

Posted

Wow. That's a tough one. Is it the case that you're currently looking at empty tables you've created so far with no fields, types etc?

 

If so you can find those values by opening and examining the .sql file in the install dir. Same should go for any contributions.

 

If you can't upload a sql file you should be able to open it and copy the contents (it's just a glorified txt file) into the sql field above the upload buttons in phpMyAdmin.

 

My real concern though is WHY can't you upload and execute a file? Is it huge?

 

Iggy

Everything's funny but nothing's a joke...

Posted

I am trying to install the 'Credit Class/Gift Vouchers/Discount Coupons (Version 5.10)', which is a huge undertaking for someone not well versed in all of this.

 

In the instructions for installation it reads:

"In the bottom level directory (The same one this document is in) you will find a file ending with .sql. This contains the database definitions for tables that are required by the contribution. These definitions need to be added to the Database that you use for your osCommerce catalog. How you achieve this depends on your installation. The easiest method is to use phpMyAdmin to upload and add the .sql file."

 

I found the file and went to phpMyAdmin through my control panel. There I found the option to 'Create New Database', however, when I tried, I received the following error:

#1044 - Access denied for user:

 

Since creating a new database did not work, I went into the osCommerce database and chose to add new tables. I was able create new tables with relative ease. However, the 'Insert Into configuration' statements, I do not understand. It looks to me that I am being asked to add new fields to the 'configuration' table, which I can do. When adding the new field and trying to enter the information requested based on the instructions given below, it wants to know what the 'Field' is which I take to be 'NEW_SIGNUP_GIFT_VOUCHER_AMOUNT', 'Type' - I have no clue, 'Attributes' - I have no clue, 'Null' is Null?, 'Default' - I have no clue, 'Extras' - I have no clue.

 

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('Welcome Gift Voucher Amount', 'NEW_SIGNUP_GIFT_VOUCHER_AMOUNT', '0', 'Welcome Gift Voucher Amount: If you do not wish to send a Gift Voucher in your create account email put 0 for no amount else if you do place the amount here i.e. 10.00 or 50.00 no currency signs', 1, 31, NULL, '2003-12-05 05:01:41', NULL, NULL);

 

Of course, the easiest way would have been to upload the sql file and let phpMyAdmin figure it out, but I was unable to find a way to do that. If there is a way to do this that I didn't find, please feel free to let me know.

Posted

Ahhhh, I think (hope) your life is about to get easier :)

 

In phpMyAdmin click in the left hand column on your database.

It will load along with a series of tabs in the right side.

One of those tabs says "SQL"

Click on it.

You'll then have options to either upload and execute a .sql file or run SQL commands from the box provided.

 

If this solves your problem you really SHOULD read the phpMyAdmin docs. It will save you a lot of consternation in the long run.

 

Hope that's got it!

 

Iggy

Everything's funny but nothing's a joke...

Posted

Thank you for that tip! I have tried to read the phpMyAdmin docs, however, for the most part, it makes no sense to me what they are trying to say. I have spent days trying to figure them out to no avail.

 

Anyway, I deleted the tables that I had already added manually, then uploaded as you indicated, in the hopes that the 'Insert Into configuration' statements would be handled as well. It did work in adding the new tables, however, the 'Insert Into configuration' instructions are still unclear to me as no new fields nor any changes were made to the configuration table. The way it reads, it appears to me that the author is wanting two new fields added to the 'configuration' table.

 

Your assistance is greatly appreciated,

Barbara

Posted

If you didn't recieve any errors it should have worked. phpMyAdmin isn't shy about letting you know if there are errors in the file or when failures occur.

 

Iggy

Everything's funny but nothing's a joke...

Posted

Again, thank you!

 

It did not indicate that there were any errors, so I will proceed and test on this addition tomorrow, and hope that all goes well.

 

Have a wonderful evening/morning,

Barbara

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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