Jump to content
Sign in to follow this  
creativeone

Product Attributes Sort Order v1.6

Recommended Posts

I installed Product Attributes Sort Order v1.6 following all instructions and keep getting the following error when trying to add an attribute.

 

 

1136 - Column count doesn't match value count at row 1

 

insert into products_attributes values (null, '53', '4', '23', '0', '+', '0','')

 

[TEP STOP]

 

Have looked on forum and googled and nothing suggested seems to help. I know it has something to do with this admin/product_attributes.php

 

tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " values ('', '" . $products_id . "', '" . $options['products_options_id'] . "', '" . $values['products_options_values_id'] . "', '" . $HTTP_POST_VARS['price'][$rows] . "', '" . $HTTP_POST_VARS['prefix'][$rows] . "', '" . (int)$attributes_sort . "')");

 

but can't figure it out. When I upload original admin/product_attributes.php I am able to add attributes but sort column is gone. Anyone? Thanks

Share this post


Link to post
Share on other sites

Installed this one (contribution 1882) for a client last night, I was confused why the 50 needed to be there but it worked.

 

	  case 'add_product_attributes':
	$products_id = tep_db_prepare_input($HTTP_POST_VARS['products_id']);
	$options_id = tep_db_prepare_input($HTTP_POST_VARS['options_id']);
	$values_id = tep_db_prepare_input($HTTP_POST_VARS['values_id']);
	$value_price = tep_db_prepare_input($HTTP_POST_VARS['value_price']);
	$price_prefix = tep_db_prepare_input($HTTP_POST_VARS['price_prefix']);
	$attributes_sort = tep_db_prepare_input($HTTP_POST_VARS['attributes_sort']);

	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) . "', '50', '" . $attributes_sort . "')");

Edited by geoffreywalton

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 ======>>>>>.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×