Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Product Attributes Sort Order v1.6


creativeone

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

Link to comment
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 ======>>>>>.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...