Trying to access "responseJSON.original_total_price"
This is my code -
const CartObject = theme.cart.getCart();
console.log(CartObject.responseJSON.original_total_price)
Making it an async function fixed it.
const CartObject = await theme.cart.getCart();
CartObject.total_price
you need to use JSON.parse
function on response eg
const responseParsed = JSON.parse(responseJSON.responseText)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.