
Javascript and liquid markup on order success page in Shopify
- or -
Post a project like this1394
£40(approx. $54)
- Posted:
- Proposals: 8
- Remote
- #3451819
- Awarded
WordPress Expert✮Shopify Expert✮Graphic Designer✮AutoCAD 2D & 3D✮CV Writer & Designer✮Fullstack developer

★Top PPH Service Provider! Shopify, WordPress, WooCommerce, Magento, & eCommerce Expert!

Expert in WordPress, PrestaShop, Shopify, PHP, Laraval, OpenAI, Flutter/FlutterFlow, Python, Django React, Node.js, ChatGPT-4, Expert

6325153379066636365733879443187238134867356137952346536





Description
Experience Level: Entry
I need to know how I add javascript and liquid markup on the order success page in Shopify using their API. It looks like I can't for a normal Shopify store (only Shopify Plus - possibly?). I know how to do this in the Shopify admin but this needs to be added as part of an app installation. Is there a different way I can do this?
This is all that I need to add:
var acTransaction = {
"user":[{
"email":"{{customer.email}}",
"firstname":"{{checkout.billing_address.first_name}}",
"lastname":"{{checkout.billing_address.last_name}}",
"order_id":"{{checkout.order_id}}",
"address":{
"address1":"{{checkout.billing_address.address1}}",
"address2":"{{checkout.billing_address.address2}}",
"address3":"",
"city":"{{checkout.billing_address.city}}",
"postcode":"{{checkout.billing_address.zip}}",
"country":"{{checkout.billing_address.country_code}}"}
}
],
"cart": [{"products":[
{% for line_item in line_items %}
{"id":"{{ line_item.sku }}","name":"{{ line_item.title }}","price":"{{ line_item.line_price | money_without_currency }}","quantity":{{ line_item.quantity }},"requires_av":{% if line_item.product.tags contains 'Requires AV' %}1{% else %}0{% endif %}
},
{% endfor %}
]}]
};
This is all that I need to add:
var acTransaction = {
"user":[{
"email":"{{customer.email}}",
"firstname":"{{checkout.billing_address.first_name}}",
"lastname":"{{checkout.billing_address.last_name}}",
"order_id":"{{checkout.order_id}}",
"address":{
"address1":"{{checkout.billing_address.address1}}",
"address2":"{{checkout.billing_address.address2}}",
"address3":"",
"city":"{{checkout.billing_address.city}}",
"postcode":"{{checkout.billing_address.zip}}",
"country":"{{checkout.billing_address.country_code}}"}
}
],
"cart": [{"products":[
{% for line_item in line_items %}
{"id":"{{ line_item.sku }}","name":"{{ line_item.title }}","price":"{{ line_item.line_price | money_without_currency }}","quantity":{{ line_item.quantity }},"requires_av":{% if line_item.product.tags contains 'Requires AV' %}1{% else %}0{% endif %}
},
{% endfor %}
]}]
};

Ben G.
100% (3)Projects Completed
6
Freelancers worked with
6
Projects awarded
67%
Last project
26 Nov 2021
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies