Hello,
I am looking for help with code to provide a volume/quantity discount for specific products in my store. Here are the details:
- I would like to offer a “2 for X” discount on specific products
- The customer should be able to select different variants within a product to get to a quantity of 2.
- Do not mix and match products – this would only apply to that specific product.- I would like the discount to be shown in the cart, not at the product level
- I’ve tried using bundle/discount apps and have had issues with every one where I am forced to add a “bundle and save” box to the product level and I do not want this.- Discount should apply to multiples of 2
- If the customer purchases 2 items, they will get a discount on each item. If the customer purchases 3 quantity of the same item, they will get a discount on 2, but pay full price for the 3rd item. Likewise – if a customer purchases 4 quantity of an item, they will get a discount on each pair- When a customer meets the quantity expectation I would like the discount to be shown per item vs. a discount on the total order.
I’ve been searching and searching and cannot find the answers I need. Shopify help center provides the following liquid code for cart quantity, but I’m not sure how to adjust it for what I need - or if this is the correct function to use.
{% comment %} Cart quantity {% endcomment %}
{{ cart | line_items_for: product | sum: ‘quantity’ }}
{{- ‘products.product.quantity.in_cart’ | t: quantity: cart_qty -}}
Would greatly appreciate any help!
thanks,
Alexandra