Categories
PrestaShop Tutorial Consultation

How to change the order of the attribute combination in the backend product combination?

We changed the sorting value of the attribute group:

However, the sorting of attribute combinations on the backend product editing page does not follow the sorting of attribute groups.

This is a BUG and we need to fix it.

classes/Product.php

Replace ORDER BY pa.`id_product_attribute` with ORDER BY ag.`position` in the getAttributeCombinationsById method.

Refresh to see the modified effect.

At present, we see that it has been displayed according to the attribute group sorting. If there are other places where the sorting is incorrect, please repeat the above method to replace the sorting rules.

Leave a Reply

Your email address will not be published. Required fields are marked *