Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

CANNOT ADD PRODCUTS - GET ERROR MESSAGE


jaxxxonn

Recommended Posts

Posted

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

 

insert into products (products_quantity, products_model, products_price, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id, products_image, products_date_added) values ('9', '', '1.99', null, '', '1', '0', '', 'murraydvd.jpg', now())

 

[TEP STOP]

 

JUST DONE A INSTALL OF OSC, WHEN I TRY AND ADD NEW PRODUCTS A PAGE COMES UP WITH THE ABOVE ERROR MESSAGE. ANYBODY THAT CAN SHED SOME LIGHT ON THIS, BE MUCH APPRECIATED. :huh:

Posted

As I recall it, osc requires a product weight. Have you tried adding a random product weight and see if it works?

Always BACK UP your files and your database before making any changes. Before asking questions, check out the Knowledge Base. Check out the contributions to see if your problem's solved there. Search the forums.

 

Useful threads: Store Speed Optimization How to make a horrible shop Basics for design change How to search the forums

 

Useful contributions: Easypopulate Fast, Easy Checkout Header Tag Controller

Posted

osCommerce does not require a product weight to be added when adding items to your Catalog. The only time you need to do it is if you set up a module that ships by weight, or if you sell a mixture of real products and virtual downloads.

 

If Colin is using the Table Rate Shipping Module then he may have entered the settings incorrectly.

 

Vger

  • 1 year later...
Posted
1366 - Incorrect decimal value: '' for column 'products_weight' at row 1

 

insert into products (products_quantity, products_model, products_price, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id, products_image, products_date_added) values ('9', '', '1.99', null, '', '1', '0', '', 'murraydvd.jpg', now())

 

[TEP STOP]

 

JUST DONE A INSTALL OF OSC, WHEN I TRY AND ADD NEW PRODUCTS A PAGE COMES UP WITH THE ABOVE ERROR MESSAGE. ANYBODY THAT CAN SHED SOME LIGHT ON THIS, BE MUCH APPRECIATED. :huh:

 

I had the same problem a while back. If you are using MySQL 5 then the solution is probably the same. You should remove the STRICT_TRANS_TABLES option form the sql-mode setting in the MySQL configuration file as described on my blog and you will be fine.

  • 1 month later...
Posted
I had the same problem a while back. If you are using MySQL 5 then the solution is probably the same. You should remove the STRICT_TRANS_TABLES option form the sql-mode setting in the MySQL configuration file as described on my blog and you will be fine.

I have followed your blog but the problem still remains. Removing STRICT_TRANS_TABLES seems to solve the problem of inserting an empty string where the column type is "int" but not where it is "decimal". Not sure what the fix is for decimal. Anyone?

Posted
I have followed your blog but the problem still remains. Removing STRICT_TRANS_TABLES seems to solve the problem of inserting an empty string where the column type is "int" but not where it is "decimal". Not sure what the fix is for decimal. Anyone?

 

Ryan, I've tried to reproduce the 1366 error you're describing but all my attempts are unsuccessful so far. All MySQL documentation about the 1366 error points in the direction of strict mode. Be sure you have the sql-mode configuration string in the my.ini file set to the following:

 

sql-mode="NO_AUTO_USER,NO_ENGINE_SUBSTITUTION".

 

If everything checks out, perhaps there is something else that's causing the 1366 error for you. Can anyone else confirm that removing STRICT_TRANS_TABLES does not fix the problem?

Posted
I have followed your blog but the problem still remains. Removing STRICT_TRANS_TABLES seems to solve the problem of inserting an empty string where the column type is "int" but not where it is "decimal". Not sure what the fix is for decimal. Anyone?

 

Ryan, I've tried to reproduce the 1366 error you're describing but all my attempts are unsuccessful so far. All MySQL documentation about the 1366 error points in the direction of strict mode. Be sure you have the sql-mode configuration string in the my.ini file set to the following:

 

sql-mode="NO_AUTO_USER,NO_ENGINE_SUBSTITUTION".

 

If everything checks out, perhaps there is something else that's causing the 1366 error for you. Can anyone else confirm that removing STRICT_TRANS_TABLES does not fix the problem?

Posted

Sorry for posting multiple times. The server response is very bad, it gave me a timeout several times. Now it seems two of them went through...

Posted
Ryan, I've tried to reproduce the 1366 error you're describing but all my attempts are unsuccessful so far. All MySQL documentation about the 1366 error points in the direction of strict mode. Be sure you have the sql-mode configuration string in the my.ini file set to the following:

 

sql-mode="NO_AUTO_USER,NO_ENGINE_SUBSTITUTION".

 

If everything checks out, perhaps there is something else that's causing the 1366 error for you. Can anyone else confirm that removing STRICT_TRANS_TABLES does not fix the problem?

Hi Guido,

 

I've checked my my.ini and the line is now:

sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

 

Yet the error I get is:

 

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

 

insert into products (products_quantity, products_model, products_price, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id, products_date_added) values ('1', '', '6', null, '', '1', '1', '', now())

 

[TEP STOP]

Posted
I works now. MySQL just needed a restart! :blush:

I already thought so. (did you see the mail I send you?) It's often the most simple things that are overlooked... enjoy :thumbsup:

Archived

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

×
×
  • Create New...