Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi! Please help me. I'm trying to get 'total_price' after added first item to cart, json has the next:
const cartJson = '/cart.js';
async function getCartJson() {
fetch(cartJson).then((res) => {
return res.json();
}).then((data) => {
let x = 0;
for (i in data.items) {
x += data.items[i].total_price;
}
console.log(x);
});
}
btw request cart/add has "final_price: 100" - can I get this?
I done it
sorry
Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025