cancel
Showing results for 
Search instead for 
Did you mean: 

Change the order of color swatches for configurable products on listing page depending on child

Change the order of color swatches for configurable products on listing page depending on child

Hi all coders,

 

I want to change the order in which color swatches appears on listing page for a configurable product. I want that the first color from left to right has to be the color of the first child (simple product) related to that configurable, not alphabetically ordered as magento do by default.

 

I use Magento 2.3.4

 

Any help would be appreciated.

 

Thanks,

Mauricio

3 REPLIES 3

Re: Change the order of color swatches for configurable products on listing page depending on child

Hi @Maurix 

 

You have to edit configurable product, in configurable tab (product edit page) you can view option for Edit Configurations.

Click on Edit Configurations, you can see select attribute screen, go to next for step 2.

 

In step 2 you can see your selected attributes like size and color.

You can change position of your attributes by drag and drop from here. drag and drop from square icon you can see.

set you attributes position here, save your product.

Now check product on front side list page, you can see your position changes here.

 

It may help!
Problem Solved? Please click on Kudos & Accept as Solution!

Problem solved? Click Accept as Solution!

Re: Change the order of color swatches for configurable products on listing page depending on child

Hi Bhanu.

 

The solution you tell me order the attributes if the configurable has more than one attribute, for example color and size. But, in the case I was asking, I'll give you an example, suppose you have a config product with color attribute only and you have only 2 colors (red an green). If I load the product in magento, the order of color will be green and then red (from left to right, alphabetically). What I want for this is to have as a first option on the left the color red and on the right the color green, because the color red is the first simple product related to that configurable loaded in DB.

 

Regards,

Mauricio

Re: Change the order of color swatches for configurable products on listing page depending on child

I am having the same problem, Can someone help on this?

 

I want to display new arrival color on the Product list page and same color should be select on landing page. I cannot do it as I do not have option to give a sequence to color variant. Is there any option here?