Your website must be subscribed to the IntelliSuggest Recommendation service in order to use Product Recommendations. Please contact support for more information.
This article describes the process for setting up Product Recommendations widgets, which are powered by IntelliSuggest.
Be sure to replace the red placeholder examples with the appropriate values (e.g., "YOUR_SITE_ID"). Your store's Site ID can be found on the My Account page.
Product Page
1. Place Template Code
Place the following code containing the product suggestions in your template where you'd like it to appear.
<div class="intellisuggest" name="Product Recommendations"></div>
2. Include JavaScript
The "product_code" in the code below is the unique SKU or product code for that item, and must match the value of the field you've mapped to "SKU" on the Core Fields page.
Placing the script just before the closing </body>
tag works best for user experience/performance.
<script type="text/javascript" src="//cdn.searchspring.net/intellisuggest/is.min.js"></script>
<script type="text/javascript">
try{
var product_code = "YOUR_PRODUCT_SKU";
IntelliSuggest.init({siteId:'YOUR_SITE_ID', context:'Product/' + product_code, seed:[product_code]});
IntelliSuggest.viewItem({sku:product_code});
} catch(err) {}
</script>
Basket Page
1. Place Template Code
Place the following code containing the product suggestions in your template where you'd like it to appear.
<div class="intellisuggest" name="Basket Recommendations"></div>
2. Include JavaScript
One or more haveItem() calls are allowed. Include a haveItem() call for each item the shopper currently has in their basket. Don't worry about figuring out what they have most recently added or removed - always include all of the items currently in the basket. Make sure to also include the SKUs of the items currently in the basket to the seed parameter in the init function call.
Placing the script just before the closing </body>
tag works best for user experience/performance.
<script type="text/javascript" src="//cdn.searchspring.net/intellisuggest/is.min.js"></script>
<script type="text/javascript">
try{
IntelliSuggest.init({siteId:'YOUR_SITE_ID', context:'Basket/', seed:['BASKET_SKU1','BASKET_SKU2','BASKET_SKU3']});
IntelliSuggest.haveItem({sku:"BASKET_SKU1", qty:"SKU1_QUANTITY", price:"SKU1_PRICE"});
IntelliSuggest.haveItem({sku:"BASKET_SKU2", qty:"SKU2_QUANTITY", price:"SKU2_PRICE"});
IntelliSuggest.haveItem({sku:"BASKET_SKU3", qty:"SKU3_QUANTITY", price:"SKU3_PRICE"});
IntelliSuggest.inBasket();
} catch(err) {}
</script>
Order Confirmation Page
1. Include JavaScript
Placing the script just before the closing </body>
tag works best for user experience/performance.
2. Make API Calls
The inSale() information arguments are all optional.
<script type="text/javascript" src="//cdn.searchspring.net/intellisuggest/is.min.js"></script>
<script type="text/javascript">
try{
IntelliSuggest.init({siteId:"YOUR_SITE_ID"});
IntelliSuggest.haveItem({sku:"SOLD_SKU1", qty:"SKU1_QUANTITY", price:"SKU1_PRICE"});
IntelliSuggest.haveItem({sku:"SOLD_SKU2", qty:"SKU2_QUANTITY", price:"SKU2_PRICE"});
IntelliSuggest.inSale({
orderId:"ORDER_ID", // The Order ID (required)
total:"TOTAL_AMOUNT", // The total order amount (optional)
city:"CITY", // Customer"s shipping address City (optional)
state:"STATE", // Customer"s shipping address State (optional)
country:"COUNTRY" // Customer"s shipping address 2-letter Country Code (optional)
});
} catch (e) {}
</script>
Comments
0 comments
Article is closed for comments.