Clau123 Posted November 15, 2012 Share Posted November 15, 2012 I wanted to copy the extra fields also if I'm copying a products to another place. I found this in my old files,it's working for me: To Copy extra fields Look for (in catalog/admin/categories.php): $dup_products_id = tep_db_insert_id(); Add after it: // BOF: Extra fields to database on duplicate $xf_query = tep_db_query("select products_id, products_extra_fields_id, products_extra_fields_value from " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " where products_id = '" . (int)$products_id . "'"); while($xfield = tep_db_fetch_array($xf_query)) { tep_db_query("insert into " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " (products_id, products_extra_fields_id, products_extra_fields_value) values ('" . (int)$dup_products_id . "', '" . tep_db_input($xfield['products_extra_fields_id']) . "', '" . tep_db_input($xfield['products_extra_fields_value']) . "')"); } // EOF: Extra fields to database on duplicate Quote Link to comment Share on other sites More sharing options...
rice Posted February 15, 2018 Share Posted February 15, 2018 you are great!!!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.