Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [discounts]

The tag has no usage guidance.

1
vote
1answer
21 views

Commerce 1 find if Discount object is valid based on start/end dates (Twig)

In Twig, I want to find out if a discount is valid based on start/end date. startDate and endDate don't seem to exist and I can't inspect the discount object by using the json_encode filter (returns {...
1
vote
1answer
16 views

Payment Method and Discount elements query by ID in Twig

In Craft 2, is it possible to query a specific element by ID in Twig? They aren't mentioned in the docs. I was trying things like these but without success: {{ craft.commerce.paymentMethods.id(1)....
0
votes
0answers
19 views

Craft Commerce Discounts - Promo code for one free item if there are five items in cart

Our site will offer only one product. Can we create a promo code that will apply 100% discount on 1 product if there are at least 5 products in the cart? I was playing with the conditions and had: ...
1
vote
1answer
36 views

Discount Code applies to cart successfully but doesn't do anything. Am I missing something?

Standard 10 dollars off discount setup. Although it says it is applied, it doesn't give me any kind of a discount. None of the discounts work, I've made multiple and tried different options but it ...
1
vote
1answer
131 views

Commerce Discount: spend $X, get product free

I want to make a promotion where at a certain cart total threshold, if a particular product is in the cart, it would be free. (e.g. spend $50 and get a free mug). Trying to sketch out the best way to ...
1
vote
1answer
39 views

Show all discounts at checkout with Craft Commerce

I've taken the difference between the actual price and sale price of items and created a variable to hold the total value to give me a total discount at my checkout. I am curious if there is a way to ...
1
vote
1answer
133 views

List applied discounts that have codes

So on a cart page, I need to list out the discounts that have been applied to a cart. I need to list them one by one, but only discounts that are applied with a code. I'm having trouble figuring out ...
2
votes
1answer
58 views

View all discounts applied to a cart and remove discounts from cart

On my cart page I have the coupon code form to apply discounts to the order. Underneath the form I want to list all the coupons applied to the cart with an button to remove each discount. As in the ...
1
vote
1answer
71 views

How to apply a discount on cart weight ?

I'd like to create a discount that is applied based on the weight of a cart. I'm working with bottles & boxes of wine, so a bottle of wine has a weight of 1kg & a box of wine can have a ...
0
votes
1answer
44 views

Apply discount on login during commerce checkout process

I assign users to specific user groups and then I created discounts that are applied to orders based on the user groups that the users are in. I have a scenario where users add items to their cart ...
2
votes
2answers
108 views

Check if there is a discount and, is yes, how much

I would like to do two things in my Craft commerce templates: In my product template: Check if there are any discounts available to a specific product. I have a way to output discounts but need to ...
1
vote
1answer
124 views

Error trapping on discount codes based on Cart contents

Is there any automatic Error trapping built into Craft for discount codes for the following rules? Orders over a set Total Orders over a set Quantity The codes work/apply, but if the rules don’t ...
3
votes
2answers
62 views

In Commerce, can I apply a discount only on a specific number of one product?

I know that I can apply a discount if a specific number of products is ordered. I could also add a discount for a specific product, with a specific amount. But, am I able to create a discount with ...
3
votes
2answers
299 views

Check if cart contains valid products for discount code

I am trying to setup some error trapping on the discount code to output an error message if there are no products that qualify for the discount code the user enters. Here is the code I have; {% ...