Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi,
I'm working on a store which delivers products in the form of QR codes. The customer is able to purchase multiples of the same item, and each item in the order is fulfilled via an external service with a different tracking link (a link to a QR code)
The problem I am having, is it seems that if an order contains 2 of the same item, only 1 tracking_url is returned via order object. I feel I've tried every which way as per the documentation and similar posts on here. I'm sure this must be possible as the default customer orders page is able to show both of the tracking links in this scenario.
Example:
Customer purchases "Item 01" -> Order fulfilled with 2x "Item 01" -> 2 tracking urls given to the customer (visible on default customer orders page)
In liquid:
Iterate over customer.orders
Iterate over orders.line_items - at this point its worth noting that only 1 line item is present for the order
{{ line_item.quantity }} returns 2
{{ line_item.fulfillment.tracking_url }} returns a single url
Iterating over line_item.fulfillment.fulfillment_line_items does not yield the desired result either.
This issue is not present if say the customer places an order with 1x "Item01" and 1x "Item02" - there is 2 tracking links available when stepping through relevant objects in customer.orders, which I assume is because they are now 2 individual line items, not a single line item with a quantity of 2?
Am I missing something or is this not achievable?
You can write script on product page which will add a random number or text as property input which you can hide for user.
By doing this same product added into the cart will add a new item in cart.
Rest is working fine at your end.
Shopify 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, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025