Hello! We are trying to implement product image source urls in a JavaScript on the OCST page. This is for a third party shopping cart abandonment email campaign. Below is the script we are using, all aspects work great except the image issue. Anyone have a workaround or know of an existing module?
<script type='text/javascript'>
var _joinnew = _joinnew || [];
_joinnew.push(['setAccount', '123456789']);
_joinnew.push(['setDomain', '.mydomain.com']);
(function() {
var s = document.createElement('script'); s.type = 'text/javascript';
s.async = true;
s.src = 'https://s3.amazonaws.com/joinnew/js/v3/t.js';
var x = document.getElementsByTagName('script')[0];
x.parentNode.insertBefore(s, x);
})();
</script>
<script type='text/javascript'>
_joinnew.push(['setCartData', {
'value': '&mvt:basket:formatted_total;',
'totalItems': '&mvte:toolkit:basketcount;',
'returnUrl': '&mvt:global:secure_sessionurl;'
}]);
<mvt:foreach iterator="item" array="basket:items">
_joinnew.push(['setCartItem', {
'product_id': '&mvt:item:code;',
'qty_price': '&mvt:item:formatted_price;',
'name': '&mvt:item:name;',
'description': '&mvt:item:name;',
'price': '&mvt:item:formatted_subtotal;',
'image_url': 'PRODUCT IMAGE PATH GOES HERE'
}]);
</mvt:foreach>
</script>
<script type='text/javascript'>
var _joinnew = _joinnew || [];
_joinnew.push(['setAccount', '123456789']);
_joinnew.push(['setDomain', '.mydomain.com']);
(function() {
var s = document.createElement('script'); s.type = 'text/javascript';
s.async = true;
s.src = 'https://s3.amazonaws.com/joinnew/js/v3/t.js';
var x = document.getElementsByTagName('script')[0];
x.parentNode.insertBefore(s, x);
})();
</script>
<script type='text/javascript'>
_joinnew.push(['setCartData', {
'value': '&mvt:basket:formatted_total;',
'totalItems': '&mvte:toolkit:basketcount;',
'returnUrl': '&mvt:global:secure_sessionurl;'
}]);
<mvt:foreach iterator="item" array="basket:items">
_joinnew.push(['setCartItem', {
'product_id': '&mvt:item:code;',
'qty_price': '&mvt:item:formatted_price;',
'name': '&mvt:item:name;',
'description': '&mvt:item:name;',
'price': '&mvt:item:formatted_subtotal;',
'image_url': 'PRODUCT IMAGE PATH GOES HERE'
}]);
</mvt:foreach>
</script>
Comment