Will pay for mod

i need a mod to import product combinations by PRODUCT_CODE not product ID…



as WE CANNOT know in advance the product ID that CS-cArt will generate when importing ITEMs…

never mind, it’s a CS-cart bug i found…

edit

schemas/exim/product_combinations.php



in



function fn_exim_put_product_combination($product_id,

comment this


  •          if (empty($object_id) && !empty($product_name)) {

$object_id = db_get_field(‘SELECT product_id FROM ?:product_descriptions

WHERE product = ?s AND lang_code = ?s’, $product_name, $lang_code);

}

*/

add this





if (empty($object_id) && !empty($product_id)) {



$object_id = db_get_field('SELECT product_id FROM ?:products WHERE product_code = ?s ', $product_id);



}







now it’s going to match the product_CODE, not the product ID… ELSE





you will have problems with multiple items with same name…



example



ITEM001, Baseball cap, red/blue and small

ITEM002, Baseball cap, blue/green medium



the first will match and fail you with a skip++ hence the comment…