Zen Cart Logo
Forums / All Other Contributions/Addons / cannot copy product after installing Short Description mod

cannot copy product after installing Short Description mod

Views: 805

Results 1 to 5 of 5
27 Apr 2012, 3:39 PM
#1
andycz avatar

andycz

New Zenner

Join Date:
Mar 2009
Location:
Czech republic
Posts:
10
Plugin Contributions:
0

cannot copy product after installing Short Description mod

Hello Guys!
After installing Short Decription mod I'm having problem with copy and create new product from my admin.
The error I'm getting is as following:

136 Column count doesn't match value count at row 1
in:
[insert into products_description (products_id, language_id, products_name, products_description, products_url, products_viewed) values ('57', '2'.....

I think the problem is in copy_to_confirm.php file but not so good in programming to identify where the problem it is.

Could please someone have a look at the code and help me identify what is error in code?

Attachment #10388
Thank you in advance!

19 May 2012, 3:16 PM
#2
andycz avatar

andycz

New Zenner

Join Date:
Mar 2009
Location:
Czech republic
Posts:
10
Plugin Contributions:
0

Re: cannot copy product after installing Short Description mod

any idea? thanks.

19 May 2012, 3:47 PM
#3
andycz avatar

andycz

New Zenner

Join Date:
Mar 2009
Location:
Czech republic
Posts:
10
Plugin Contributions:
0

Re: cannot copy product after installing Short Description mod

find out the solution..

in the first end eights lines of the code missed "products_short_desc" entity. So the correct code is below.

            $description = $db->Execute("select language_id, products_name, products_short_desc, products_description, 
                                                             products_url
                                         from " . TABLE_PRODUCTS_DESCRIPTION . "
                                         where products_id = '" . (int)$products_id . "'");
            while (!$description->EOF) {
              $db->Execute("insert into " . TABLE_PRODUCTS_DESCRIPTION . "
                                        (products_id, language_id, products_name, products_short_desc, products_description,
                                         products_url, products_viewed)
                            values ('" . (int)$dup_products_id . "',
                                    '" . (int)$description->fields['language_id'] . "',
                                    '" . zen_db_input($description->fields['products_name']) . "',
				    '" . zen_db_input($description->fields['products_short_desc']) . "',
                                    '" . zen_db_input($description->fields['products_description']) . "',
                                    '" . zen_db_input($description->fields['products_url']) . "', '0')");
              $description->MoveNext();
            }
19 May 2012, 3:54 PM
#4
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,180
Plugin Contributions:
0

Re: cannot copy product after installing Short Description mod

Ty for posting the correct fix ..

26 May 2012, 8:41 AM
#5
andycz avatar

andycz

New Zenner

Join Date:
Mar 2009
Location:
Czech republic
Posts:
10
Plugin Contributions:
0

Re: cannot copy product after installing Short Description mod

to haredo
what did you mean? it is correct fix. it's working for me.