All things Shopify and commerce
We are a collective store and I want to be able to offer discounts from the store, but when I do an order discount the discount gets evenly split between all of the products (and product vendors). Is there a way for the discount to come off the order but not affect the product price?
Added note, these are for an in store POS system.
Apply the discount at the order level, without altering the individual product prices.
You can add a "discount line item" in the checkout process to reduce the total order price. This way, the product prices remain the same, and vendors receive the correct revenue for their products.
Is that the same as a "Custom Cart Discount"? I don't see "discount line item" listed.
A custom cart discount applies a percentage or fixed amount discount at the checkout stage. Shopify natively supports this via discount codes or automatic discounts.
The discount is applied to the total order value, which gets distributed across all the products in the cart. This may reduce the final amount each vendor receives in a multi-vendor store.
You can write a custom script that applies a discount at the cart level without changing individual product prices. This ensures that the discount reduces the total cost but doesn't impact the product breakdown for vendors.
Example of script:
DISCOUNT_RATE = 0.20
Input.cart.line_items.each do |line_item|
next if line_item.variant.product.gift_card?
line_item.change_line_price(line_item.line_price * (1 - DISCOUNT_RATE), message: "20% Cart Discount")
end
Output.cart = Input.cart
Oh man, this is way over my head! 😬
Thank you for all your help! Are you able to tell me where I can locate the "discount line item" that you previously mentioned?
Log in to Your Shopify Admin Panel: Go to your Shopify store admin by logging in at your-store-name.myshopify.com/admin.
Navigate to Discounts:
Create a New Discount:
Configure the Discount:
Save the Discount:
Log in to Your Shopify Admin Panel: Use the same link as above to access your admin panel.
Navigate to Discounts:
Create or Edit Discounts:
Use Shopify Scripts:
Write the Script:
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024