Optional Implementations
Find Similar Buttons
The "Find Similar" or "More Like This" buttons on your product listing page allows your customers to search your entire catalogue for products similar to the one they are looking at. Reducing the need to scroll or search through other product listing pages, making for a more enjoyable shopping experience.

Option 1: Inserting The Buttons:
Copy and paste the <form> below in the position, in your product card on your product listing page, where you would like the button to appear.
<form action="javascript:void(0);">
<button type="submit" class="sb-findsim-v2" data-sku="URL_OF_PRODUCT">More like this</button>
</form>
In the above <button> you need to replace URL_OF_PRODUCT with the URL of the product in the associated product card.
Once the button is in position, you can choose the wording you prefer and style it in any manner you wish.
If inserted correctly, when the button is pressed by the end-user, the Shopbox shopping assistant should present similar products for the product card you were looking at.

Option 2: Using Custom Events :
Firing the following event will trigger the Shopbox App to open and run the find similar call on the provided PRODUCT_URL.
function shopboxFindSimilarEvent(PRODUCT_URL) {
document.querySelector("body").dispatchEvent(
new CustomEvent("sbTriggerFindSimilar", {
detail: PRODUCT_URL,
bubbles: true,
cancelable: true,
composed: false,
})
);
}