Personalized checkout and custom promotions with Shopify Scripts
I am trying to collect data from the order status page via Liquid script but I am getting inconsistent results when accessing checkout.line_items.
I added the code below to the order status page additional scripts section, and for some orders I get the correct amount of items, but for some I get 0. I can't find a pattern, but it's consistent between orders (once 0 always 0, once correct always correct). For some orders this prop exists, for some it doesn't.
Obviously all orders have items.
Can anyone shed some light please?
To complement, the whole checkout object seems to not be present. This line of code prints nothing:
console.log('checkout.id', {{checkout.id}});
As 2024 wraps up, the dropshipping landscape is already shifting towards 2025's trends....
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024