Wizard Posted February 20, 2014 Report Share Posted February 20, 2014 Возможно эта тема поднималась, не нашел соответствующей темы. пишу пока увидел небольшой недочет. При импорте варианты не имеют последовательности. стандартный код в файле import.php // Иначе - добавляем elseif(empty($variant_id)) { if(empty($product_id)) $product_id = $this->products->add_product($product); $variant['product_id'] = $product_id; $variant_id = $this->variants->add_variant($variant); $imported_item->status = 'added'; } меняем на: // Иначе - добавляем elseif(empty($variant_id)) { if(empty($product_id)) $product_id = $this->products->add_product($product); $this->db->query('SELECT max(v.position) as pos FROM __variants v WHERE v.product_id=? LIMIT 1', $product_id); $pos = $this->db->result('pos'); $variant['position'] = $pos+1; $variant['product_id'] = $product_id; $variant_id = $this->variants->add_variant($variant); $imported_item->status = 'added'; } Quote Link to post Share on other sites
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.