22/09/2025 Franck Bugnet How to

Delete or merge duplicate features

It sometimes happens that, when importing files from different suppliers, we end up with several similar characteristics, or even duplicates.
Sometimes, these values even belong to duplicate features, or to features with very similar names.
When there are only a few of these, there's nothing to worry about, but when duplicates of this kind multiply, it unnecessarily burdens the database and therefore slows down the store.
Moreover, by providing a different feature description from one product page to another, even though it's the same option, you're providing confusing information to your customers that could cause you to lose orders.

Let's see how you can clean up your store's table data, without a line of code, by merging these duplicate features with our module PrestaShop Merlin Backoffice (feature available from Merlin version 1.6).


Show features containing duplicates in PrestaShop Merlin module

  1. Connect the Merlin module to your database, no need to select categories or products, go directly to the "Features"
  2. tab.
  3. Click on the "eye" button to have Merlin read all the characteristics present in the database and display them.
  4. Select one or more lines in the left-hand table to display in 4/ all their values in the 3rd table. As a reminder, the 2nd table is used to translate feature names into all languages, the 4th to translate values and the one on the right to manage custom features.



Show PrestaShop features

Select values to merge and delete


Or simply with the mouse, using click, shift+click and crtl+click (as for all multi-line selections in Windows), always selecting the one to be kept first (if it matters):

Line selection with shift or ctrl

Or by automatic search with the "Find and select" tool:

Automatic search and selection

It's magic! even similar values written in uppercase are found and selected automatically:

Automatic search and selection result

Merge duplicates

  1. It couldn't be easier to click on the button representing two arrows that merge into one.
  2. Merlin asks you what value to give to the single retained value.
  3. You can check this box to tell Merlin to stop offering to modify the value. It will then always take the value of the first line selected.



Start Merge

How are duplicates deleted or merged?

  • Only one of the values is retained (a single value identifier), the first in the selection.
  • His value is replaced by the new value entered.
  • The identifiers of the other values, if they had associated products, are replaced in these associations by the identifier of the one retained.
  • These other characteristic values are then permanently deleted from the database.

Can we merge values belonging to several different categories?


Absolutely, just select the different characteristics, the value table then displays the complete list and you just have to select them before doing the merge in the same way.

If products were associated with one of the cleaned characteristic values, they will be automatically associated with the retained one even if it belongs to another type.

How to move values from one feature to another without losing links with associated PrestaShop products.


In fact, after merging the common or similar values of two (or more) features, there may be values remaining in some features that have no equivalent in the feature you want to keep. In this case, it's useful to know how to move them, to group all the values in the same place.
The difficulty lies in the fact that if products have these characteristic values, as with the merging method above, you need to retain these links.

Example: we have two duplicate characteristics, "Format" and "Formats", of the same type, which we wish to group into one. They contain three common or equal values (in green), and we find two values in "Formats" (in yellow), which don't exist in "Format".

Feature moving exercise, starting situation

To merge all this, there are two possible approaches.

  1. The simplest, would be to merge everything into "Formats" as this is the one that contains all the values.
  2. But suppose for some reason we need to keep "Format" and delete "Formats", in that case we need to move the two values in yellow from "Formats" to "Format".


We start with the merge method explained earlier in this article, by merging the green values into "Format", which gives us:

Feature moving exercise, 1st merge

Next, we use the duplicate feature to create a duplicate in "Format", of the two remaining values in "Formats". Proceed as follows:

  1. Select the two features
  2. Select the two values to be copied
  3. Click on the duplicate button


Duplicate feature values in several different features

After this, both values are present in both groups.

All that remains is to merge these values (two by two) as you now know how to do (which will preserve the product associations and is therefore equivalent to transferring values between two characteristics), then delete "Formats" which will be empty (see next paragraph):

Merge values that have been duplicated

Delete empty features, if duplicated


If, after merging all the values of one or more features, you end up with features that are empty of any value, the next best thing is to delete them. It's easy to do with Merlin:

  1. Select the features to be deleted (left-hand table).
  2. Check that the table of feature values is empty (3rd table).
  3. Then click on the "Minus" delete button on the left of the table.


Delete features

ATTENTION:

  1. If you delete a feature value, without having merged it, the associated products will of course be de-associated and it will then be impossible to find them again to associate a replacement feature value.
  2. If you delete a feature containing associated values, they will be deleted, along with their associations, again with loss of history.
  3. A feature may have custom values, not visible in the list of shared values. Check that this is not the case before deleting a feature, as custom values are deleted at the same time and due to their very nature (product-specific and therefore necessarily associated), it is not possible to merge or move them.



Note that Merlin is natively compatible with multi-feature modules for PrestaShop 1.4 to 1.6, as well as with PS 1.7's native multi-value feature mode (a mode that can be disabled in Merlin, by the way).
So depending on the operating mode chosen, the result may be different. Experiment to obtain the desired result.

Category's other articles Mass management of PrestaShop features

Settings
  • Login
    • £ GBP
    • $ USD
Menu