Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Adding New product


Brunswick

Recommended Posts

Posted

Hello,

 

I had posted this in the general I & C forum but did not get any responses. Hopefully I'll do better here. If my question is unclear I'd be happy to explain further.

 

When adding a new product on the "New Product" form page, I am required to show a manufacturer and enter a weight neither of which are relevant to my products. Somewhere!!! (in admin?) there has to be a place where you can disable these functions, but where??? I know these are currently mandatory because if I don't enter something in either of these two spaces I get a (very ugly) PHP error message.

 

In the Product Listing configuration page I have zeroed out virtually everything.

I sure would appreciate an answer.

 

Thank You.

 

-Hank

 

(FWIW Some people just seem to breeze through the installation and I sure envy them. I have struggled with this software for months and each problem seems to take forever to resolve. I am not a stupid person but not very intuitive, I guess.) :(

Posted

Not surprised you didn't get an answer. Not many psychics out here.

 

Like what is the message ?

 

What version of osCommerce?

 

I have just entered 2 completely blank products, just clicked new product / preview / insert. Both went on fine, displayed with a broken image.

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Posted
Hello,

 

I had posted this in the general I & C forum but did not get any responses. Hopefully I'll do better here. If my question is unclear I'd be happy to explain further.

I sure would appreciate an answer.

 

Thank You.

 

-Hank

 

(FWIW Some people just seem to breeze through the installation and I sure envy them. I have struggled with this software for months and each problem seems to take forever to resolve. I am not a stupid person but not very intuitive, I guess.) :(

 

Hank,

 

Goto your osCommerce Admin

 

Click on Configuration > Product Listing

 

Now, edit the weight and manufacturer fields so that the sort order is 0. Edit any other field to 0 that you do not wanted listed on your product displays.

 

When you go to your Catalog and begin a new product there should be a [---select none---] for your manufacturer and you can leave the product weight at the bottom blank.

 

Now of course, if you are using anything other than a flat rate for shipping I would imagine you would run into issues with UPS/USPS when trying to poll a price for Shipping for your customer at checkout.

 

Let me know if you have any other questions, I'll do my best to help.

Posted
Not surprised you didn't get an answer. Not many psychics out here.

 

Like what is the message ?

 

What version of osCommerce?

 

I have just entered 2 completely blank products, just clicked new product / preview / insert. Both went on fine, displayed with a broken image.

Hello geoffrey,

 

Sorry about "omitting" some "vital" information. Please understand that what may be obvious to you, may not be to me.

 

Anyway, here are some details:

 

I'm constructing this cart on my own machine using:

-WinXP home

-Apache 2.2.4

-PHP 5.2.4

-MySQL

-osCommerce Ver2.2ms2-060817

 

Here is a screenshot of my admin page:

 

OSC_Admin.jpg

 

When I attempt to enter without a manufacturer I get the following error message:

1366 - Incorrect integer value: '' for column 'manufacturers_id' at row 1

 

update products set products_quantity = '1000', products_model = '', products_price = '1.7900', products_date_available = null, products_weight = '1.00', products_status = '1', products_tax_class_id = '1', manufacturers_id = '', products_image = 'candy1_3.jpg', products_last_modified = now() where products_id = '49'

 

and when I attempt to enter without a weight I get:

1366 - Incorrect decimal value: '' for column 'products_weight' at row 1

 

update products set products_quantity = '1000', products_model = '', products_price = '1.7900', products_date_available = null, products_weight = '', products_status = '1', products_tax_class_id = '1', manufacturers_id = '10', products_image = 'candy1_3.jpg', products_last_modified = now() where products_id = '49'

 

Hope this helps.

 

(BTW I'd also like to eliminate the "Products Quantity:" if possible.)

 

Thank you,

 

-Hank

 

P.S. FWIW I have spent many hours searching on the forum and reading endless posts so this is not for lack of trying.

Posted
Hank,

 

Goto your osCommerce Admin

 

Click on Configuration > Product Listing

 

Now, edit the weight and manufacturer fields so that the sort order is 0. Edit any other field to 0 that you do not wanted listed on your product displays.

 

When you go to your Catalog and begin a new product there should be a [---select none---] for your manufacturer and you can leave the product weight at the bottom blank.

 

Now of course, if you are using anything other than a flat rate for shipping I would imagine you would run into issues with UPS/USPS when trying to poll a price for Shipping for your customer at checkout.

 

Let me know if you have any other questions, I'll do my best to help.

 

Hello and thank you for your response.

 

As you can see from this screenshot:

 

OSC_Admin.jpg

 

I believe I did edit the fields along the lines you suggested, I think. This makes me think there may be some other issue such as the version of my PHP for example. I've been trying to find out whether the version of osCommerce I'm using is compatible with my PHP. In any case, I'm still getting the error messages.

 

You can also see my response to geoffreywalton for more on this. Any further input is more than welcome. :)

 

FWIW I set my shipping to flat rate.

 

Best,

 

-Hank

Posted

The error messages you posted were for an update to product 49.

 

Just want to check, do you get the same type of problem when inserting?

 

Heve you used phpmy admin to check the default values on the product table?

 

Also browse the data to see if the data looks valid.

 

Will try to look at this further, should be able to get to it on Tues. I'll try setting up product 49 and then use the sql you posted above.

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Posted

Hank

 

Couldn't reproduce your error so using google guess what I found

 

http://blog.guidol.nl/archives/23-MySQL-sq...pplication.html

 

I'm looking for an open source implementation of a stable, easy customizable, well supported ecommerce application like OsCommerce or CubeCart. To be able to try one or two of these apps for myself I installed a complete LAMP stack on a virtual windows XP image a while back.

 

I used MySQL 5 for that was the latest version at the time. Not aware of some of the changes in the default configuration, every ecommerce package that I tried to run gave me an error message at the point I tried to add something to the database. Be it a new category or item. OsCommerce as well as CubeCart could not insert anything into the database and gave me a message similar to this one:

 

1366: Incorrect decimal value: '' for column 'per_ship' at row 1

 

QUERY = INSERT INTO store_CubeCart_category (`cat_name`, `cat_father_id`, `cat_image`, `per_ship`, `item_ship`, `item_int_ship`, `per_int_ship`) VALUES ('test', '1', '', '', '', '', '')

 

The cause of this error can be traced back to the configuration of MySQL 5 and a new 'feature' called STRICT_TRANS_TABLES that is turned on by default. At least for the windows version of MySQL. The following line in the configuration file my.ini was causing these PHP applications to fail:

 

# Set the SQL mode to strict

sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

 

The MySQL documentation gives the following information about STRICT_TRANS_TABLES: If a value could not be inserted as given into a transactional table, abort the statement. For a non-transactional table, abort the statement if the value occurs in a single-row statement or the first row of a multiple-row statement. More detail is given later in this section. (Implemented in MySQL 5.0.2)

 

The solution to the errors is simple. Remove the STRICT_TRANS_TABLES from the sql-mode setting and everything runs smoothly.

 

So the question is are you using mysql5?

 

Can you find a file called my.ini?

 

And finally does this make you a happy bunny?

 

Enjoy

 

G

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Posted
Hank

 

Couldn't reproduce your error so using google guess what I found

 

http://blog.guidol.nl/archives/23-MySQL-sq...pplication.html

 

I'm looking for an open source implementation of a stable, easy customizable, well supported ecommerce application like OsCommerce or CubeCart. To be able to try one or two of these apps for myself I installed a complete LAMP stack on a virtual windows XP image a while back.

 

I used MySQL 5 for that was the latest version at the time. Not aware of some of the changes in the default configuration, every ecommerce package that I tried to run gave me an error message at the point I tried to add something to the database. Be it a new category or item. OsCommerce as well as CubeCart could not insert anything into the database and gave me a message similar to this one:

 

1366: Incorrect decimal value: '' for column 'per_ship' at row 1

 

QUERY = INSERT INTO store_CubeCart_category (`cat_name`, `cat_father_id`, `cat_image`, `per_ship`, `item_ship`, `item_int_ship`, `per_int_ship`) VALUES ('test', '1', '', '', '', '', '')

 

The cause of this error can be traced back to the configuration of MySQL 5 and a new 'feature' called STRICT_TRANS_TABLES that is turned on by default. At least for the windows version of MySQL. The following line in the configuration file my.ini was causing these PHP applications to fail:

 

# Set the SQL mode to strict

sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

 

The MySQL documentation gives the following information about STRICT_TRANS_TABLES: If a value could not be inserted as given into a transactional table, abort the statement. For a non-transactional table, abort the statement if the value occurs in a single-row statement or the first row of a multiple-row statement. More detail is given later in this section. (Implemented in MySQL 5.0.2)

 

The solution to the errors is simple. Remove the STRICT_TRANS_TABLES from the sql-mode setting and everything runs smoothly.

 

So the question is are you using mysql5?

 

Can you find a file called my.ini?

 

And finally does this make you a happy bunny?

 

Enjoy

 

G

 

Hello Geoffrey Walton,

 

Here's a message from "happy bunny"!

 

Thank you very much for your efforts! Your suggestion worked like a charm. Developing a working version of osCommerce on your own computer, rather than on a live host, makes the most sense of course. Like the person in the Google post, I too naively installed MySQL 5 since it was the most recent stable version.

 

So now I commented out the offending line in "my.ini" and presto, osCommerce began to work without a hitch. Haven't tried everything but it looks very good.

 

I know there were some references on the forum, to the versions of PHP and MySQL but they were mostly in old posts so it was a bit unclear if there were still compatibility issues. Anyway, I was on the verge of (reluctantly) removing version 5 of MySQL from my machine and installing version 4, but this solution seems to be much simpler and very effective.

 

I suspect there are many others out there ready to give up on osCommerce just because of this issue so I hope they all get to see this post. The connection between the problem and the solution was, to me at least, far from obvious so I suspect others will have the same reaction. Although I routinely Google for these kinds of problems, it didn't occur to me to try what you did.

 

So, once again, thank you very much. I'll attempt to glue the hair (I pulled out) back on my head and hop over to the carrot patch for some relaxation! :)

 

Best,

 

-Hank Mulder

 

P.S. It would make sense to me that these version compatibility issues should be stressed at the beginning of the Documentation PDF.

Archived

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

×
×
  • Create New...