-- HikaShop version -- : 2.6.4
-- HikaMarket version -- : 1.7.2
-- Joomla version -- : 3.6.4
-- PHP version -- : 5.6.25
-- Browser(s) name and version -- : All browsers
-- Error-message(debug-mod must be tuned on) -- : Duplicate entry 'MON-0002' for key 'product_code' SQL=UPDATE `#__hikashop_product` SET `product_name`='Name',`product_code`='MON-0002',`product_quantity`='-1',`product_manufacturer_id`='',`product_published`='1',`product_vendor_id`='1',`product_page_title`='',`product_url`='',`product_meta_description`='',`product_keywords`='',`product_alias`='name',`product_canonical`='',`product_tax_id`='',`product_msrp`='0.0000000',`product_min_per_order`='0',`product_max_per_order`='0',`product_sale_start`='',`product_sale_end`='',`product_warehouse_id`='',`product_weight`='0.000',`product_weight_unit`='kg',`product_length`='0.000',`product_width`='0.000',`product_dimension_unit`='m',`product_height`='0.000',`testcustomfield`='',`product_access`='all',`product_type`='main',`product_description`='',`product_modified`='1479818869' WHERE `product_id`='53'
We found two major errors with the handling of duplicated product code.
FIRST
When Hikamarket multivendor settings -> main -> main options -> Avoid duplicate product code is SET TO NO
if I create a new product from scratch and use an already existing product_code a message shows warning of:
A product with the same code already exists
This seems to me wrong as the settings are reacting the opposite of its label indication "
Avoid duplicate product code"
If I duplicate an already existing product and then I remove the _copy384756 suffix so the product_code gets back to match the original product_code then I get an horrible CRASH SCREEN as the one attached here:
The only thing that to my understanding is working is when the Avoid duplicate product code is set to YES as then the system by its own aggregates the product_id as a suffix to the product_code.
Anyhow I think (but this is only my interpretation of how it should work) the user should be warned of this product_code mutation automatically been made when the product is saved.