Created
April 20, 2018 21:38
-
-
Save 10foldsolutions/b331a278786c717bc0a27d40e02757a7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if context == 'cart' or context == 'checkout' %} | |
<script type="text/javascript"> | |
/* include cart total amount */ | |
_cartstack.push(['setCartTotal', '{{ total_order }}']); | |
/* cart items loop, to be included in the email template */ | |
{% for item in items %} | |
_cartstack.push(['setCartItem', { | |
'quantity':'{{ item.quantity }}', | |
'productID':'{{ item.code }}', | |
'productName': encodeURI('{{ item.name }}'), | |
'productDescription':'{{ item.category }}', | |
'productURL':'{{ item.url }}', | |
'productImageURL':'{{ item.image }}', | |
'productPrice':'{{ item.price_each }}'; | |
}]); | |
{% endfor %} | |
</script> | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment