Question

In the store, the store views / website's products are kept separated.

To avoid overlap of SKUs, we have to approaches:

  • Add a prefix during import (but we might need to remove that when displaying)
  • Define SKU to be only unique on website level.

Is this second approach generally possible?

Was it helpful?

Solution

Making this possible in Magento would require you to change the database structure,for example the sku field in the product flat table is a UNIQUE value, but also several files for the admin and any other code that filters products on sku.

If it's purely for a visual reason I would suggest using your first approach. It would require you to edit several template files but would definitely be of less risk to the stability of your installation.

From my experience, making these kinds of big changes to the Magento core inevitably leads to conflicts. Either in the Magento core or third party extensions.

OTHER TIPS

Another possibility could be to use an additional attribute for the displayed SKU. Add a prefix/suffix to the original sku to keep the sku unique, and fill the new sku field with the short SKU. You just have to modify the template in order to display the value of the new attribute (or add a frontend after_load-observer to populate the content of the field "sku" with the value from the new attribute - this would have to be tested).

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top