- Login to your 3dCart Admin.
- Navigate to Settings > Design > Template Editor.
Product Page
- Click the edit button next to "listing_0.html" to edit the product page template.
- At the end of the template add the following code. Replace YOUR_SITE_ID with your Searchspring Site ID.
<script type="text/javascript" src="//cdn.searchspring.net/intellisuggest/is.min.js"></script> <script type="text/javascript"> try{ var product_code = "[catalogid]"; IntelliSuggest.init({siteId:'YOUR_SITE_ID', context:'Product/' + product_code, seed:product_code}); IntelliSuggest.viewItem({sku:product_code}); } catch(err) {} </script>
- Click the "Save Changes" button.
Basket Page
- Click the edit button next to "view_cart.html" to edit the cart page template.
- Add the following HTML to the top of the template.
<script type="text/javascript"> var intellisuggest_items = []; var intellisuggest_seeds = []; </script>
- Add the following code in the "<!--START: SHOPPING_CART_ITEM-->" section.
<script type="text/javascript"> intellisuggest_items.push({ sku: "[ITEM_CATALOGID]", qty: "[ITEM_QUANTITY]", price: "[ITEM_PRICE]".replace(/[$,]/g, '') }); intellisuggest_seeds.push("[ITEM_CATALOGID]"); </script>
- Add the following code to the bottom of the template. Replace YOUR_SITE_ID with your Searchspring Site ID.
<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:intellisuggest_seeds}); for(var i=0; i < intellisuggest_items.length; i++) { IntelliSuggest.haveItem(intellisuggest_items[i]); } IntelliSuggest.inBasket(); } catch(err) {} </script>
- Click the "Save Changes" button.
Order Confirmation Page
- Click the edit button next to "checkout-step4.html" to edit the order confirmation template.
- Add the following HTML to the top of the template
<script type="text/javascript"> var intellisuggest_items = []; </script>
- Add the following code in the "<-- START: items -->" section.
<script type="text/javascript"> var price = "[unitprice]"; intellisuggest_items.push({ sku: "[catalogid]", qty: "[numitems]", price: price.replace(/[$,]/g, '') }); </script>
- Add the following code to the bottom of the template. Replace YOUR_SITE_ID with your Searchspring Site ID.
<script type="text/javascript" src="//cdn.searchspring.net/intellisuggest/is.min.js"></script> <script type="text/javascript"> try{ IntelliSuggest.init({siteId:"YOUR_SITE_ID"}); for(var i=0; i < intellisuggest_items.length; i++) { IntelliSuggest.haveItem(intellisuggest_items[i]); } var total = "[ SUBTOTAL ]"; IntelliSuggest.inSale({ orderId: "[invoicenum]", total: total.replace(/[$,]/g, '') }); } catch (e) {} </script>
Comments
1 comment
This doesn't mention the additional step at the end of the generic instructions:
"Product Clicks (Category, Brand and Search Results Pages)"
Is that step still necessary?
Please sign in to leave a comment.