我正在尝试修改Shopify的跟踪代码以输出订单中的项目,但它给我的问题是不返回我想要的内容。请任何想法。这是var pr =不起作用的值。其余的很好,并输出我们需要的东西:
<!-- Onefeed Tracking -->
<script type="text/javascript" language="javascript">
var of_ssid = 'xxxx';
var cs = '{{ total_price | money_without_currency }}';
var oi = '{{ order_number }}';
var it = '{{ line_item.quantity }}';
var pr = '{% assign items = line_item.product_id | split: "," | parse_json %}
{{ items[forloop.index] }}';
var nc = '';
</script>
<script type="text/javascript" language="javascript" src="https://tracking.onefeed.co.uk/t.js"></script>
<noscript>
<img border="0" src="https://tracking.onefeed.co.uk/ProcessProductCheckout.ashx?of_ssid=xxxx&cs={{ total_price | money_without_currency }}&it={{ line_item.quantity }}&oi={{ order_number }}&nc=&pr={% assign items = line_item.product_id | split: "," | parse_json %}
{{ items[forloop.index] }}" />
</noscript>
<!-- /Onefeed Tracking -->