Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PRODUCT ATTRIBUTES PROBLEM


jaxxxonn

Recommended Posts

I am trying to add product attributes to an item, but when i click the insert button i get a page with the below text on it:

 

 

1264 - Out of range value adjusted for column 'products_attributes_id' at row 1

 

insert into products_attributes values ('', '47', '5', '13', '', '+')

 

[TEP STOP]

 

 

Be much appreciated if anybody can offer a solution to this problem, ive searched everywhere for a fix but to no avail. :(

Link to comment
Share on other sites

Sounds like you have MySQL 5.x, which is balking at inserting a string into an integer field.

 

In admin/products_attributes.php, find this line:

 

tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " values ('', '" . (int)$products_id . "', '" . (int)$options_id . "', '" . (int)$values_id . "', '" . tep_db_input($value_price) . "', '" . tep_db_input($price_prefix) . "')");

 

and change it to

 

tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " values (null, '" . (int)$products_id . "', '" . (int)$options_id . "', '" . (int)$values_id . "', '" . tep_db_input($value_price) . "', '" . tep_db_input($price_prefix) . "')");

Contributions

 

Discount Coupon Codes

Donations

Link to comment
Share on other sites

Thanks, i changed the code, it works for normal products if i add 0.00 in the box second from right, but if i leave that blank then i get the error message, also get error message when i try and add attributes to a downloadable item. No big problem there tho as i mainly sell physical goods.

 

 

Thanks for your time and help, its much appreciated.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...