Guest Posted November 16, 2005 Posted November 16, 2005 1264 - Out of range value adjusted for column 'products_attributes_id' at row 1 insert into products_attributes values ('', '28', '3', '4', '', '+') [TEP STOP] No matter what I put in for any field, I get the same error. The first value above does not seem to be something I can change, it always shows up as just two apostrophes. There is also a chance I'm not understanding what this section does, is it not how I add options to a product, such as model, size, color, etc? Thanks
♥yesudo Posted November 17, 2005 Posted November 17, 2005 How many records do you have in the table - products_attributes ? Your online success is Paramount.
Guest Posted November 17, 2005 Posted November 17, 2005 How many records do you have in the table - products_attributes ? Um.... I don't know? Where is that?
Guest Posted November 17, 2005 Posted November 17, 2005 Any ideas? I have many options and no way to add them....
Guest Posted November 18, 2005 Posted November 18, 2005 Little help please? I know next to nothing about php and mysql, so I'm totally lost here. My uneducated guess is the first blank field in ('', '28', '3', '4', '', '+') is the attribute ID, and this is the problem? Like it's trying to use null as a product attirbute because there are none so it's starting from nothing? Or am I just babbling like a moron? I don't have any product attributes at all and badly need them.... How do I fix this? If I were to manually enter a product attribute into the DB, would that get it started? And how the hell do I do that? PHP4 MySQL5 Windows 2000 Adv. Server Local server I also installed 'Improved Product Attributes/Item Editor' (found here: http://www.oscommerce.com/community/contributions,1397) hoping to bypass this little problem to no avail. In fact it seemed to have complicated things since the buttons in the new/edit product page inexplicably disappeared. For now I'll be damned happy if I can just get the product attributes page working.
Jeremy at oddly enough Posted November 18, 2005 Posted November 18, 2005 Sounds like you may have made a mistake installing that contrib somewhere along the line. Go back and double check everything form the start to the end. If that doesn't help, restore the back up files that you made (hopefully) before changing anything. If you didn't back up, you could retore to files from a fresh download (as long as you haven't heavily modded your site yet). If you have lots of options, look at all the attribute contribs, I think easy populate is a popular one for others with a lot of attribs. I taught myself how to enter them straight into the db tables (products to for that matter), bypassing the admin interface completely, but this takes a bit of time to figure out and put into practice, because to make it efficient, you need to use a spreadsheet to write scripts of commands, and you need to be diligent in doing so to keep all the info grouped together properly. This is a brief descriptin of what's involved in this method : http://www.oscommerce.com/forums/index.php?s=&...ndpost&p=617991 Good Luck, Jeremy
Guest Posted November 18, 2005 Posted November 18, 2005 Sounds like you may have made a mistake installing that contrib somewhere along the line. Go back and double check everything form the start to the end. If that doesn't help, restore the back up files that you made (hopefully) before changing anything. If you didn't back up, you could retore to files from a fresh download (as long as you haven't heavily modded your site yet). If you have lots of options, look at all the attribute contribs, I think easy populate is a popular one for others with a lot of attribs. I taught myself how to enter them straight into the db tables (products to for that matter), bypassing the admin interface completely, but this takes a bit of time to figure out and put into practice, because to make it efficient, you need to use a spreadsheet to write scripts of commands, and you need to be diligent in doing so to keep all the info grouped together properly. This is a brief descriptin of what's involved in this method : http://www.oscommerce.com/forums/index.php?s=&...ndpost&p=617991Good Luck, Jeremy The thing is I was having this problem long before I installed that contribution. I have since reverted to the backed up original files that didn't work in the first place. Without having added any contributions or modifying any pages outside of the admin interface I cannot add attributes.
Guest Posted November 19, 2005 Posted November 19, 2005 In trying to trouble shoot this myself to no avail, I have reached the following conclusion: For some lame reason the out of range value is the attribute ID, in this case it should be 1, however it is null. So, pretty pretty please, with sugar on top, someone tell me how to fix this...?
♥yesudo Posted November 19, 2005 Posted November 19, 2005 PM me your ftp and control panel details, if you are happy to, and i'll take a look. Your online success is Paramount.
Guest Posted November 21, 2005 Posted November 21, 2005 PM me your ftp and control panel details, if you are happy to, and i'll take a look. PM sent, thanks :)
Guest Posted November 22, 2005 Posted November 22, 2005 OK, I managed to fix a similar problem with a null value in regard to product notifications in application_top.php after placting an order, as per post #18 of this thread: http://www.oscommerce.com/forums/index.php?s=&...ndpost&p=735932 I of course do realize that that is intended to make the file PHP5 compatible while I am running PHP4, but it worked and that's all that matters. Because I'm having the same issue with a null value, I'm guessing a similar change to product_attributes.php would solve this issue. However I am not PHP savvy enough to figure out what to change, nor what to change it to if I knew what I was after in the first place. I am running osCommerce 2.2 Milestone 2. Please help :(
Guest Posted November 23, 2005 Posted November 23, 2005 Hooray! I'm not retarded! I fixed it with a simple copy + paste! In line 61 of my product_attributes.php for no good reason the " . (int)$products_attributes_id . " was missing. I simply copied it from line 71 when I noticed line 61 had a void in quotes instead of whatever the hell I copied. Even without any real understanding of how exactly this stuff works, I just had to stare at it long enough to figure out what it wanted to see there. Works flawlesly thus far, I'm going to test it out and report back if I find any other problems. Thanks to those that have offered help, especially you, yesudo :)
Guest Posted November 24, 2005 Posted November 24, 2005 Just an update, this fixed my problem in full. The odd thing is I never messed with that file, after my failed attempt at installing a contribution I copied the products_attributes.php file driect from the zip file of a fresh OSC 2 MS2 download, and it was still missing that line :blink: Anyway problem solved, just posting again for the furutre reference of others should they encounter the same issue :)
crainey Posted November 27, 2005 Posted November 27, 2005 :thumbsup: Cheers DoctorStupid! That did the trick for me also! Not to bad for someone who doesn't know much about PHP!
jskillet Posted January 18, 2006 Posted January 18, 2006 I'm having the same issue, but I am having a hard time following your fix. Could you post what you products_attributes.php looks like or at least the lines that you changed? Thanks!
Guest Posted January 19, 2006 Posted January 19, 2006 Line 61 in catalog/admin/product_attirbutes.php looks like this right out of the zip file: 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) . "')"); After TABLE_PRODUCTS_ATTRIBUTES, in the values thing, where it says ('', '" . etc it's missing a paramter after the comma, copy the below and paste it to replace the above code, and that's it :) tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " values ('" . (int)$products_attributes_id . "', '" . (int)$products_id . "', '" . (int)$options_id . "', '" . (int)$values_id . "', '" . tep_db_input($value_price) . "', '" . tep_db_input($price_prefix) . "')"); It's simply missing " . (int)$products_attributes_id . " I would offer my full attributes file, but it's been VERY modified since I started this thread :)
yopyop22 Posted March 8, 2006 Posted March 8, 2006 i do this but it's still doesn't work 1366 - Incorrect decimal value: '' for column 'options_values_price' at row 1 insert into products_attributes values (0, '7938', '1', '1', '', '+') [TEP STOP] ???
Guest Posted March 8, 2006 Posted March 8, 2006 i do this but it's still doesn't work 1366 - Incorrect decimal value: '' for column 'options_values_price' at row 1 insert into products_attributes values (0, '7938', '1', '1', '', '+') [TEP STOP] ??? Did you leave the option price blank? Put a 0 in it if there is no price change for the option, otherwise it will give that error.
dcox Posted November 11, 2006 Posted November 11, 2006 1366 - Incorrect decimal value: '' for column 'options_values_price' at row 1 insert into products_attributes values (0, '7938', '1', '1', '', '+') [TEP STOP] I had the same issue and was trying to do as it said above. Problem is my code is a few lines off: so I was replacing the wrong line. make sure you are only replacing 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) . "')"); it should be around line 61. For me it was line 67.
pricelessimprinters Posted February 2, 2007 Posted February 2, 2007 Please help with this - I did all the above and we are still not getting attributes to work. 1136 - Column count doesn't match value count at row 1 insert into products_attributes values ('0', '304', '4', '4', '25.0000', '#') Below is my line #61 tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " values ('" . (int)$products_attributes_id . "', '" . (int)$products_id . "', '" . (int)$options_id . "', '" . (int)$values_id . "', '" . tep_db_input($value_price) . "', '" . tep_db_input($price_prefix) . "')"); I also tried fresh copies and they do not work either. I did the following contribution yesterday and after reversing the code we do not work either. product_attributes_search_v3.1
eakatank Posted March 22, 2007 Posted March 22, 2007 I ran into the same problem when trying to add product without having any manufacturers specified.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.