Questions tagged [coupon]
Denotes questions specific to shopping cart coupons. Consider using the shopping-cart-price-rules tag if the question is regarding shopping cart price rules in general.
342 questions
1
vote
1
answer
1k
views
Magento 2 : Apply Cart Rule to Base Price not Special Price
Good Day, Mates!
I am using Magento 2.4.x and try to change its cart price rule mode, I simply want to calculate all discounts (percentage or fixed amount) on Base Price.
For example, If a product has ...
0
votes
2
answers
1k
views
How to get coupon times used with coupon code using REST Api?
I have no experience with Magento. I was asigned the task to validate a coupon code via magento rest api. I've tried to use /V1/coupons/search GET method. My request url is:
https://example.com/...
0
votes
0
answers
35
views
Magento 2 - Which event is triggered when payment fails and coupon code usage needs to be reset on the checkout page?
We are currently using the PayPal Braintree module on our Magento 2 website. We need to find an event that triggers when a payment fails during checkout. The issue we are facing is that when a ...
0
votes
1
answer
21
views
Expiring coupons in EE
I've created an extension to programmatically add coupons that expire in 24 hrs (more or less).
All is working on Community version. My problem is with EE.
Checking the docs it seems that, on EE, the ...
2
votes
2
answers
2k
views
Magento 2.2 Programatically apply coupon code
How can i apply coupon code programatically in magento 2 using cart id.
Thanks.
1
vote
2
answers
2k
views
Show discount including tax, calculate discount excluding tax
I want to display the discount amount including tax on cart overview page (totals summary).
Magento 2.1.8
Relevant settings:
Catalog prices: Excluding tax
Apply Customer Tax: After discount
Apply ...
4
votes
1
answer
3k
views
Magento 2: How to Apply Coupon Code based on Product Customizable Option
I want to create coupon code for specific product and custom option
E.g.
Sku: Test1
Custom Option:
Name: Demo Custom Option
Option Type: Field
I want to apply the coupon code ...
3
votes
1
answer
2k
views
Show coupon code in newsletter subscription success message
I need to show dynamically generated coupon code into my newsletter subscription success message in frontend:
I installed an extension of popup newsletter subscription module in Magento version 1.9.1....
0
votes
1
answer
2k
views
Magento 2 coupon apply and remove event
I want to redirect to /checkout if a coupon is applied and it is valid. I have tried this event controller_action_predispatch_checkout_cart_couponPost this only works on coupon cancel and /cart page. ...
0
votes
1
answer
15
views
Same coupon code and fixed prices
I have a dataset with around 1000 products with fixed prices that only needs to be applied when one certain CouponCode is used.
Does this functionality exist or maybe an extension have this figured ...
3
votes
1
answer
3k
views
Magento2: Apply coupon code to regular price not to special price
When applying a coupon, it gives a discount to final price (special price if set). How to make modification that discount would apply only to regular prices (before the previous discount).
Note: I ...
0
votes
0
answers
89
views
Magento 2 coupon code shows 1 Times used in admin but it is not showing in any orders
We are currently using Magento version 2.4.5-p1. We've encountered an issue with the Magento cart price rule with coupon codes.
The problem is as follows:
1 - In the Magento admin panel -> Cart ...
0
votes
0
answers
29
views
Magento 2 : Error of continues reloading while apply and cancel of coupon code in checkout page
When trying to apply and cancel coupon code on the checkout page it continues reloading and getting an error in the console of cannot read the properties of undefined.
See the attached images below of ...
1
vote
1
answer
61
views
Is the coupon usage limitation broken in general due to async update?
We have coupons which should be usable only once.
In my integration tests I was able to use them twice.
I found out, that this is linked to the queue runners. When I start the queue consumers locally, ...
1
vote
2
answers
3k
views
Magento 2: Restrict customer to use 1 coupon code
I have multiple coupon codes in my store. The customer should not be able to use a coupon if he/she has already used a coupon before? Is that possible? Thanks.
0
votes
1
answer
31
views
Is there a way to have 1 coupon with 4 different values
I am looking for an solution that with which i can do the following:
I want to use 1 coupon code for this.
If Subtotal (Excl. Tax) exeeds € 1500,- then give 2.5% reduction over the whole cart.
If ...
0
votes
2
answers
560
views
How to apply multiple coupon in Magento 2.4.7?
In Magento 2.4.7, now multiple coupon is supported.
Shoppers can apply multiple coupons to a cart. Merchants can also apply multiple coupons using shopping assistance.
However after applied one coupon ...
2
votes
1
answer
3k
views
How can I give first time customers a discount on their next order?
The conditions would be:
1) customers only
2) One time use only
3) must have previous order
#1 and #2 are straight forward, but what is a good approach to only giving this to customers that have ...
5
votes
2
answers
1k
views
Disable tier pricing when applying coupon code
I want to have a web shop where products have tier pricing, such as:
order 3 save 10%
order 10 save 20%
This is easy by setting tier pricing in products.
However, I don't want tier pricing to ...
0
votes
1
answer
33
views
How to get from_date and to_date of cart_rule and catelog_rule in magento 2?
I'm writing a before plugin and i need to get from_date and to_date of cart_rule and catelog_rule in my plugin code
namespace Vendor\CouponBeforePlugin\Plugin;
use Magento\Quote\Model\Quote\Item\...
0
votes
1
answer
30
views
Is it possible and how can I create a discount coupon via webapi or graphql natively?
I found this here in the documentation but I don't know where the value or type of discount goes, whether percentage or fixed
5
votes
0
answers
275
views
Magento2 : How to show as separate lines for each discount on cart page?
In magento2 - Anybody please let me know how we can separate the discounts on cart page on different lines.
For example: I have a basic discount $5 for all products and I'm applying a promotion code ...
2
votes
1
answer
1k
views
How to check if a coupon code is a free shipping one?
I'm working with Magento 1.9.2.
I need to check (via code) if a coupon is a "free shipping" one: how can I do it? I searched everywhere online but I didn't find a solution yet.
I know there are two ...
0
votes
2
answers
488
views
How to import 20.000 coupon codes in Magento 2 without paid
I want to import 20.000 coupon codes on my website, and for this reason, I created the following script:
<?php
use Magento\Framework\App\Bootstrap;
/**
* If your external file is in root folder
...
0
votes
0
answers
117
views
Magento 2 coupon code is not used but it is show used on admin
Magento version 2.4.5-p1.
In the Magento cart price rule, the coupon code is shown as marked on admin but it is not used from the frontend, and also coupon code is not visible when we checked from ...
0
votes
0
answers
107
views
Magento 2.4.4 Coupon Usage Count Not Reflect in Admin Cart Price Rule
Coupon for single use is used multiple times,
ssue
Merchants set up a coupon for single use and customers are able to use it multiple times.
Steps to reproduce:
Create a coupon and configure the ...
0
votes
0
answers
132
views
Magento 2 - New coupon code not working in cart page
Magento 2 coupon code are saved in cart while changed new coupon code still shows the old coupon code how to fix this issue?
0
votes
0
answers
42
views
Magento 2 : How to programatically apply a condition on a coupon for specific product?
I want to apply a condition on a brand Product if the condition is true the coupon should not be applied.
Please Revert Asap!
THANK YOU!
0
votes
2
answers
320
views
Getting coupon codes from sales rule?
Magento 2.4.6
I creates a sales rule, lets say it has ID 123. I am loading it like this for now (yes, I know ObjectManager is bad practice):
$objectManager = \Magento\Framework\App\ObjectManager::...
1
vote
1
answer
433
views
How to Add Cart Price Rule Condition in Coupon Code Programmatically in Magento 2.4.0?
I want to add Add condition in Coupon Code: If Email is [email protected]
Please check attached screenshot:
How do I'll do this programmatically? Please check my code everything is working fine ...
1
vote
0
answers
169
views
Magento2.4.5-p1 coupon with uses per coupon 1 and per customer with coupon not working
Magento Version - 2.4.5-p1
Using FPC (full page cache enabled)
Issue: Create a coupon with uses per coupon as 1 and uses per customer as 1 also. Even both uses type set to 1 even after that we are ...
5
votes
4
answers
3k
views
Is the salesrule_coupon "expiration_date" field used for anything?
When you create a coupon code in Magento 1 or Magento 2 (a "Shopping Cart Price Rule"), you can set date range where the coupon is valid from/to. This information is stored in the salesrule table, ...
1
vote
1
answer
34
views
magento 2.4 what are coupon modifiers?
I'm looking at Magento\SalesRule\view\frontend\web\js\action\set-coupon-code.js and on line 47 there's this code:
//Allowing to modify coupon-apply request
dataModifiers.forEach(function (modifier) {...
0
votes
1
answer
220
views
Create Sales Rule With Subtotal condition
I know how to create a sales rule.
But i'm failing to add this rule a condition based on the subtotal
Which means i Want to reproduce this programmatically
I see this is added into the salesrule ...
0
votes
2
answers
1k
views
Magento 2 coupon code : DIscount maximum up to x amount
i want to create coupon code in magneto something like below
1:discount 1% of sub-total up to a maximum of Rs. 300
i can not find any such way to do via magento backend
3
votes
2
answers
1k
views
Why there is $address->hasCouponCode() in qoute's _validateCouponCode() function?
I'm just courius why there is check for $address->hasCouponCode()
in _validateCouponCode (Mage_Sales_Model_Quote).
I think that there is no such data in model nor in database like coupon code for ...
1
vote
1
answer
644
views
Magento Coupon Codes Not showing up in Report
I have set up various coupon codes in Magento, all work ok. However not all of them show up in the 'Coupon Usage Reports' page. They have all been made exactly the same way. Why is this?
0
votes
1
answer
879
views
Custom Coupon Code Validation
Using Magento 2.4.
I need some help in tackling a task.
In a store developed with Magento2 I need to create/extend the validation for coupon codes.
This particular store relies heavily on coupon codes ...
0
votes
1
answer
26
views
Get coupon / Discount object
In (themePath)/Magento_Checkout/templates/cart/item/default.phtml, i want get the coupon / Discount object.
I use this code :
@var \Magento\Framework\View\Element\AbstractBlock $block
[...]
var_dump($...
2
votes
1
answer
639
views
Magento 2.4.4 - Module coupon return $object_or_class must be of type object|string, null given
I have updated the Magento 2.4.4 version and also the stripe payment module.
I noticed that when I try to save or create a coupon from the Magento backend it comes back this error related to the ...
0
votes
1
answer
32
views
Coupon code definition and usage restriction
Please Suggest a method to restrict the coupon code for 1 time only, even if the coupon codes are bulk generated using the Manage Coupon Codes functionality. All individual codes needed to be ...
1
vote
0
answers
266
views
How to apply multiple coupon codes on cart / quote in Magento 2.3.x?
Need custom logic to apply multiple coupon codes on a Cart / Quote in Magento 2.3.x.
Core Magento allows to apply only one coupon code on Cart. However, I need to apply multiple coupon codes on an ...
1
vote
2
answers
423
views
Free shipping option not going away
I have a Shipping Method for Free Shipping if price is >= $100. "show method if not applicable" is set to no..
I have a shopping cart price rule coupon. 10% discount. Free Shipping is set to No.
...
1
vote
0
answers
117
views
How to we can send Coupon Code For Next Order Discount in Magento 2.4.0?
I want to send Coupon Code for Next Order Discount. When any customer will place an order then customer will received a unique Coupon Code For Next Order.
anyone have an idea how to i'll do this ?
0
votes
0
answers
441
views
Magento 2.3.1 Is there a way to apply discount to only 2nd product added to cart?
We want to achieve or to have below discount rule. Please let us know if it is possible or it can be achieved through any plugin.
There are 3 SKU's A, B, C. User added SKU A to the cart. The user will ...
0
votes
1
answer
1k
views
Display coupon code on Product page. Magento1.9
I want to display the coupon code on the product page. In shopping cart price rules, I have applied coupons to a particular category. I want to display the coupon on every product page whose category ...
2
votes
6
answers
1k
views
How to translate coupon title "Discount"
I tried to translate with the translate.csv file, but in this case it doesn't work.
I also tried to find the file in "checkout" folder (every file in the folder) but it doesn't contain the word "...
2
votes
1
answer
365
views
How to move coupon code to shipping step of checkout in Magento 2?
I am trying to move coupon code to shipping step instead of payments & review step. how this can be implemented?
I need discount code form to appear in shipping step after shipping methods ...
2
votes
1
answer
865
views
Reset timeused coupon for one customer
I want to reset the usedtime for one customer back to 0 that he can use this coupon again. I tried to change thing in the sql but didn't work.
0
votes
1
answer
352
views
Magento 2: Cart price rule conditions not working
I have created a cart price rule with coupon code. The condition should be that the code should be applied for all categories except a few categories like this:
I don't know why but this is not ...