Get the latest developer guides on Fynd Partners Help
This action component is used to add a particular product to compare on the compare page, product is added into the compare using its slug.
|addCompare||function||this function is used to add the product into compare|
|removeCompare||function||this function remove products from the compare and update the router while removing the product from it.|
|addMultipleCompare||function||this function is used to add multiple prouducts into the compare at the same time.|
|navigateToCompare||function||this function is used to update the router, while pushing the slugs of available products in comapre|
|resetCompare||function||this function resets the compare by removing all the products from compare and updating the router while removing all the product slugs from it.|
Here slug is the product’s slug which needed to be added in compare
Here slug is the product’s slug which needed to be removed from compare
- addMultipleCompare([slug1, slug2, slug3, ...])
Here array of multiple slug is passed as parameter.
<img src="./../../../assets/images/compare-icon.png" alt />
<p>Add to Compare</p>