To create a support ticket, start a search

Fusionner les groupes d'attributs


Having multiple combination attribute groups with similar names can often happen, for example Size, sizes, SIZE - visible in Sc > Catalog > Attributes & Groups.


 

This leads to multiple duplicated attributes overloading your database unnecessarily as well as difficulty managing combinations on your products, but also displays various similar names on product pages on your online shop.

Technically speaking, 'merging' these attribute groups means removing existing combinations (using these groups) to recreate them with just one group (Size for example).

This 'merging' procedure is a little complex but possible when using Sc export and import tools. The steps are detailed below.

Here, we'll use groups Size, sizes, SIZE
 

1. Exporting existing combinations

You export mapping will include the following fields:

  • _fixed_value
  • id_product
  • combination attribute > Size
  • combination attribute > sizes
  • combination attribute > SIZE
  • reference
  • supplier reference + default value
  • ean13
  • upc
  • quantity
  • price excl. tax
  • weight
  • images: urls_to_all 


Still in the mapping, rename these two fields, using 'Column name':

  • _fixed_value: Action: Delete all combinations
  • images : urls_to_all: imageURL


Your mapping will be identical to this screenshot (except the group names of course) :



 

The exported information will enable us to re-use them when creating the new combinations when importing in the next step, so nothing will be lost.

Complete your export configuration (categories, options) ; refer to this article if need be.

 

2. Modifying the exported csv file

Once the file is exported, you will have 1 line per combination, with 1 column per attribute group: Size, sizes, SIZE.

We decide to keep Size. We will remove the other two.

All attributes displayed in columns sizes and SIZE (the one we don't want to keep) need to be dragged to the column Size, that we keep.

sizes and SIZE columns are now empty. You can delete them off the file.



 

Then, in the very first column called 'Action: Delete all Combinations', insert 1 on all lines corresponding to a new id_product, like this:



 

If you have ean13 in your file, do remember to apply the format option 'number + 0 decimals', for the codes to be correctly displayed.



 


You're done with the modifications, you can save the file. 

 

3. Importing the csv file

Load the file in Sc csv import window and select it (highlighted on an orange background).

The column titles of your csv file are automatically displayed in the mapping panel. Click on the last icon  for the mapping to be completed automatically.


 

Select the options in the top panel: id_product + skip + modify
Tick the option called 'create elements (auto)'


 

Remplace the number of line '500' by the number of lines of your csv file. 
Start the import process.


 

During the import process, the existing combinations on your products (detected by their ID) will be deleted and AT THE SAME TIME new combinations will be created using the one group 'Size', and with the same information as before (reference, quantity, ean, price, etc).

 

And finally, once the import is finished, all new combinations created, you can delete the duplicated attribute groups from Catalog > Attributes & Groups.