You can use swatch images for Walmart, just like for other marketplaces. However, because swat images on Walmart can only be used for the first variation of the parent, Walmart requires you to use these in a certain way..
For Example: If you have two variations as “Large,Red” and “X-Large,Red” using the “size,color” variation theme, you need to send the swatch image for the first variant. If you do not then Walmart doesn’t populate your swatch images on the listing page.
To avoid this kind of situation, we are using functions for the “swatchVariantAttribute” and “swatchImageUrl” in the templates.
- swatchVariantAttribute’s function is “If({Product.IsFirstChild},color)”
“IsFirstChild” resembles the first variation of the parent product which the swatch image will be assigned for.
“color” resembles the variation option you are using and it can be changed with a possible option for swatchVariantAttribute field. Basically, the images will be displayed among the variants by their colors.
- swatchImageUrl’s function are “If({Product.IsFirstChild},{Product.SwatchImageUrl}) and If({Product.IsFirstChild},{Product.ImageUrl})
Here are the steps you need to follow:
1- Go to “Settings>Template”, find the Walmart template and click edit.
2- Add the “swatchVariantAttribute” field from the “Add Field”. After this;
- Click “Show Possible Options”.
- Set the source field as “Manual”
- And copy the function “If({Product.IsFirstChild},color)”
You can change the color with the possible options.
3- Add the “swatchImageUrl” field. Then, use the same directions just like the previous field. But this time, click "Add New” after adding the Source 0. So;
- Source 0: If({Product.IsFirstChild},{Product.SwatchImageUrl})
- Source 1: If({Product.IsFirstChild},{Product.ImageUrl})
If the swatch images for the related products have no data, then the system will use the second source which is their image urls.
4- After saving the template, select the parent and its variations and send force product data update to the channel.
5- Sync the channel from the top left.