Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I am building an integration from a Point of Sale to import orders into Shopify through a custom app.
I'm now handling the case of discounts, and first, I need to aggregate all the discounts applied to an order line, which is... fine, but will not handle the case of several discounts applied to a single order line.
But to the point: when I send through the Graphql Admin API a draftOrder with their order lines, and with a discount of on one order line like:
line_items [
{
originalUnitPrice: 2,
quantity: 4,
taxable: true,
title: 'Title',
variantId: 'gid://shopify/ProductVariant/WHATEVER',
appliedDiscount: {
amount: 1.4,
value: 1.4,
title: 'Applied discount at POS',
valueType: 'FIXED_AMOUNT'
}
}
]
The discount is applied for each one of the items, so if a customer buys for at the shop, in Shopify it is reflected to have a discount per each one of the order lines.
Is this expected? How can we send just a discount affecting the order line and not each one of the items, dividing the discount by the number of items?
Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
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