similar-products-variants
Last updated
Last updated
The Similar Products Variants app returns similar products related to an SKU so users can select other colors or types of the same product.
Set up similar products in your store’s Products and SKU. Access your store’s Admin and go to Products > Catalog > Products and SKU.
In Products and SKU, in the column SKU, click on the desired SKU.
In the field Similar (Alternative Products), type the product name you desire
Then, In Products and SKU, in the column SKU, click on the one you have added in the last step.
Go to the Images
tab, and on the field Label
, type a name to identify the image displayed in the thumbnail through the imageLabel
prop of the Similar Products
Variants app.
Now, follow the app’s configuration below to show the similar products you have set up.
Using VTEX IO CLI, install the app by running the following:
Add the vtex.similar-products-variants
app to your theme's dependencies in the manifest.json
Add the similar-products-variants
block to the product template you desire, such as store.product
, to display a similar product list.
Prop name | Type | Description | Default value |
---|---|---|---|
| String | The identifier of the image thumbnail displayed for each variant. The identifier is set in the Admin’s Catalog. If the label does not exist or is not defined, the first image is used. |
|
| Number or responsive breakpoints | the width of image. |
|
| Number or responsive breakpoints | the height of image. |
|
| String or responsive breakpoints | the aspect ratio of image |
|
| Number | Number of items to be showed before a label with rest count be showed |
|
| Boolean | If current product has to be displayed in similar list |
|
You could add a children
to change the render of items like a slider.
To apply CSS customizations in this and other blocks, follow the instructions given in the recipe on Using CSS Handles for store customization.
CSS Handles |
---|
|
|
|
|
|