Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

attribute copier not working


dodiorne

Recommended Posts

  • 2 months later...

Ok guys,

I have received this error after installed attribute_copier .061, and also when installed Attrib Sort_v.1.0 and attrib_sort_v1.1.

I have deinstalled the last two contributions, and keep the first one. This is one that I really need. Here is what I have done, and until now, is working 100%. I have tested several times.

 

In catalog/admin/products_attributes.php I changed this:

 

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

 

for this:

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

 

and it works. I know someone post in another topic this solution, and also another one with admin-categories, so full credit goes to him.

I have posted here for those that are following this thread.

thanks

far

Link to comment
Share on other sites

  • 2 months later...

hello,

I have installed both the attributes-sorter-copier v5 contribution, and attributes copier 6.1. They look good in my categories/products and product attribute areas of the admin, and I have tried to copy the attributes from one item to another.

I can get as far as the preview screen, but after I hit the "Update" button I get the error:

 

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

 

insert into products_attributes values ('', '140', '6', '83', '0.0000', '+', '0', '0', '0.00', '', '0', '0.0000')

 

[TEP STOP]

 

I tried the fix described below, but it did not fix the error and actually generated a different one.

 

You mentioned that there were other posts that described a similar fix but in the admin-categories, rather than admin-products attributes and I would like to try that fix if you can point me in the right direction.

 

Also I was wondering if there is any conflict between the attribute copier contribution and the option-type feature and the options-as-images contributions.

 

Thanks in advance for your help!

 

ps. I am also new to forum etiquette so if I need to include links to the examples or contributions let me know.

Link to comment
Share on other sites

Hi Maureen,

Can't help you too much because I'm also so kind of new to php, but this error means that columns count and columns you code is generating is not the same. It must be same qty.

Also I see too many values your product_attributes file is trying to enter in the table. It is not a good idea to install varies contributions at the same time.

The version .061 just need to add ,'0' and the end.

you may post your link if you like.

good luck

far

Link to comment
Share on other sites

  • 2 months later...

Hello,

 

I had the error with the database columns thing.

 

I nuked the attribute sort thing out of categories.php

 

I nuked my products_attributes table and re-made it with a stock one from a new osc install.

 

I did the db mods from readme.txt and now it works. Can't explain it...but if you get that column error thing remake the products_attributes table and mod it to specification and it should work.

 

Let me know if this works for you too.

 

Brad

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.
Note: Your post will require moderator approval before it will be visible.

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