Knowledgebase
Can't add Product Attributes in osC after installing QBI
Posted by Adam Liberman on 07 November 2007 10:12 PM
Problem:
The following error message appears when trying to add a Product Attribute in osC after installing QBI:

1136 - Column count doesn't match value count at row 1
insert into products_attributes values ('', '78', '15', '77', '0', '+')
[TEP STOP]


Cause:
The code in osC doesn't allow for the extra table columns added by QBI.

Solution:
In the osC file: /catalog/admin/products_attributes.php
Line: 61
Change:

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) . "')");

To:


tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " set products_id='" . (int)$products_id . "', options_id='" . (int)$options_id . "', options_values_id='" . (int)$values_id . "', options_values_price='" . tep_db_input($value_price) . "', price_prefix='" . tep_db_input($price_prefix) . "'");

Versions:
3.50 +
(321 vote(s))
Helpful
Not helpful