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.

Filter by
Sorted by
Tagged with
0
votes
0answers
10 views

Magento2 coupon discount value doesn't change when shipping to an ex-VAT country from a VAT country

For a UK based store there are customers in the Channel Islands and other places where VAT is not applicable. The store does not charge VAT when selling to customers outside the EU. Therefore the GBP ...
0
votes
1answer
25 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
1answer
13 views

Create conditions for coupon rule in Magento 2

I'm trying to create conditions in the coupon rules, but when creating the conditions they are not aggregated correctly Im doing: $rule = $this->couponRule; $cond['conditions']['...
0
votes
0answers
44 views

Magento 2: discount coupon not working ONLY on checkout page

In Magento 2.3.3 and I have noticed that the discount code is not working on the Checkout Page. The weird thing is that, It is working on the Cart Page, but on the Checkout Page It doesn't do ...
1
vote
0answers
25 views

Change coupon discount calculation

I'm new in Magento, and if someone can bring me some light is there a way to overwrite the calculation method when discount is applyed? Mage version 1.9.4. The problem is for eaxmple how mage is ...
0
votes
0answers
35 views

Automatically Coupon code stop working on front end Magneto 2

I have used the coupon code before but now automatically Specific Coupon Code stop working on the website It is generated properly but automatically it stops working 1: I have run all Setup upgrade ...
0
votes
0answers
18 views

Listing coupons / price rules separately in checkout?

Magento 2.2.3 I have a cart price rule which will give a 4% discount depending on the payment method. I also have a coupon called MYCOUPON giving another 5%. Magento adds those together and shows a ...
0
votes
1answer
101 views

How to show Applied discount from Shopping Cart on Shipping Step Checkout Page Magento 2?

Please Check Attached screenshot: On Checkout Page under Shipping Step i want to display Shopping Cart page applied discount Coupon Code and Amount. Please check below code: app\code\Vendor\...
0
votes
1answer
37 views

Magento 2: SQL error when redeeming coupon code

Magento 2.2.9 When I try to redeem a coupon code I get an SQL error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'rule_coupons.expiration_date' in 'where clause', query was: SELECT `t`.* ...
0
votes
0answers
71 views

Magento2 : Not able to apply coupon code from checkout page

When I apply coupon code from the checkout page then I will get invalid routes error and when I have checked in the console request then I will get the 404 error from the API request. Coupon code is ...
0
votes
0answers
11 views

how to add condition for coupon where subtotal including tax => defined value in coupon setup magento1?

In Website the Catalog price is set with a 3rd party API and that automatically adds the tax amount. It also shows in the front end but when i try to apply coupon condition based on subtotal the ...
0
votes
0answers
31 views

M2: coupon code for cart price rule applies percentage discount to whole cart instead of specific products

If I apply my Magento 2 cart price rule coupon code which is set up to give a 10% discount on products of a specific attribute set the coupon code will show as having been applied to my whole cart; ...
0
votes
0answers
14 views

Expand “Apply Discount” block on Checkout payment page by default

I'm trying to get the "Apply Discount" block to auto-expand on the payment page in checkout. I've got it working in the cart by overriding coupon.phtml but the checkout payment version is: html/...
0
votes
0answers
11 views

M2 - Minus coupon code on order summary

If a user adds a coupon code i.e. (10% off) is there a way this can be deducted off the items price in the order summary on the checkout? For example the price of the item would be $26.10 on the image ...
0
votes
0answers
30 views

Magento 2 Same Coupon code with different Actions

I am having 3 types of Category C1,C2 and C3. In every category there are products. 1) C1 has P1,P2 and P3 (Each P cost $38) 2) C2 has P4, P5 and P6 (Each P cost $58) 3) C3 has P7 and P8 (Each P ...
0
votes
0answers
7 views

Generate 50% off coupon on already discounted products.If there is 10%, 20%, 30% or 0% OFF then the coupon should make it 50%

I want to generate coupon that apply 50% OFF on the products but if there is already discount on them like 10% OFF then the coupon should make it 50% OFF.Like wise if there is already 30% OFF the ...
0
votes
1answer
39 views

How to Get List of Coupons Available for Customer Using REST API

I need to get the List of Coupons Available for Logged in customers using REST API.
0
votes
0answers
13 views

Discount Message showing twice

Can anyone help me figure this out? I added text (as the default rule label) when creating a coupon code but for some reason in checkout the message shows up twice
0
votes
0answers
42 views

Magento 2 Random customers unable to apply coupon

We are running in to the issue when random customers unable to apply valid auto generated coupon codes, using default Magento 2 MARKETING > Cart Price Rules feature option. They get "Coupon code is ...
0
votes
1answer
202 views

Uncaught Error: Function name must be a string magento 2

Fatal error: Uncaught Error: Function name must be a string in /Applications/MAMP/htdocs/magentoshop/app/code/Magestore/couponoverride/Model/CouponManagement.php:74 Stack trace: #0 [internal ...
2
votes
3answers
49 views

M2 - Change end date of all coupon codes

In the database there is a table called salesrule_coupon which has all the coupon codes in it. I need to change the column expiration_date for all the coupons to the same date 30-08-2024, Is This ...
0
votes
1answer
45 views

Can anyone explain me the code and what is been returned in $discountData : Magento 2

$rulePercent = min(100, $rule->getDiscountAmount()); $discountData = $this->discountFactory->create(); $itemPrice = $this->validator->getItemPrice($item); $baseItemPrice = $...
0
votes
1answer
53 views

How to check if a sales rules coupon is allowed

I'm trying to know how can I check if a sales rules coupon is allowed for a quote in magento 1.9. Here the scenario : I have a few active rules in my shop and I would like to check if one of them is ...
0
votes
1answer
142 views

override coupon management and guestcoupon management core vendor files magento 2

I want to override Couponmanagement.php of Magento\quote\Model\CouponManagement and guestcouponmanagemet.php of Magento\quote\Model\GuestCart\GuestCouponManagement but my plugins are not working....
0
votes
1answer
23 views

Magento which model is correct for getting the quote in the cart?

I have tried every different combo of model that returns a quote in order to try and find the one that has the quote for the current customer's cart. So far none of them work, and I can't figure out ...
0
votes
0answers
29 views

Magento 2: create coupon code

I want to create a coupon code which can work as a gift card. Gift Card will be applied separately (not in discount form/ Multiple coupon can be apply) I followed Coupon code to achieve this but the ...
0
votes
0answers
44 views

Exclude special price items from coupon code Magento 2

How can I exclude special price items from a coupon code in Magento 2 but also apply a coupon to regular priced items? I have tried 'special price equals to or greater than 0' which works but if the ...
0
votes
0answers
18 views

How to filter product collection where sku used in any of the shopping cart rules in magento 2

I am trying to retrieve the product collections where skus are used in shopping cart rules. Here what all i am trying is I need to get the list of sku which are used in any of the shopping cart ...
0
votes
0answers
27 views

Hide reward points payment when discound code is applied in magento 2

I want to hide reward points payment option while discount code is applied but I don't know if that can be set somewhere in the Magento admin panel. I want to do it in reverse direction too, so if ...
0
votes
1answer
23 views

Coupon code doesn't get set, no error

I've created a program to automatically create coupon codes based on certain criteria for a user, the code generation works fine, and I can test that by sending the coupon code in through the URL(like ...
0
votes
2answers
384 views

Magento CE 2.3.2 TypeError: setCouponCodeAction.registerDataModifier is not a function

After updating Magento CE 2.3.1 to 2.3.2 incl. updating libsodium we have trouble with our checkout. When trying to access the checkout - does not matter which way - we get the following TypeError: ...
0
votes
0answers
17 views

Manually check that applied coupon code is for free shipping on cart and checkout page Magento1.9

I want to check that the coupon which is applied is for free shipping on cart and checkout page. Thanks.
0
votes
1answer
26 views

Magento 1 creating a variable fixed-amount coupon code in PHP

I'm trying to create a coupon code for a customer that gets a fixed value from PHP (essentially it can be a different amount for each customer/instance of generation). For the coupon code generation, ...
0
votes
0answers
11 views

M2 - Add coupon codes for the same rule

For a client we needs to add existing codes (about 400) with most of them with the same rule. I've already created a code which created multiple codes for the same rule. When I look into the database ...
0
votes
1answer
64 views

sectionLoadUrl error while updating cart price total Magento 2

I am updating the cart total price dynamically without page reload. I wrote code in js file require( [ 'Magento_Checkout/js/model/cart/cache', 'Magento_Checkout/js/model/cart/totals-processor/...
4
votes
1answer
746 views

How to update checkout/cart/ orders total when promo code is applied dynamically without page reload

I have changed my checkout/cart/ page promo code to ajax call so that it doesn't get reloaded, while on the success of that ajax call, I have to update the total price summary dynamically without ...
0
votes
0answers
22 views

$15 off when you spend $100 or more coupon

We added a cart price rule that gives you $15 discount when you purchase a total of $100 or more. We recently got an order having a discount of $100+ when the customer used the coupon code. I've read ...
1
vote
1answer
38 views

Coupon Plugin the cart is shown as empty

I want to create a plugin to hook into the CouponManagement System. I hook into beforeSet and it triggers but the cart is shown as empty, This is my code: protected $_quote; private $logger; ...
3
votes
0answers
29 views

magento 1.9 special offer timer for first time user

For my Magento 1.9 website, I want to set the special offer timer. In which I want to display this timer to first time user (new visitor) only and it will use this offer within an hour only. After an ...
0
votes
1answer
26 views

“Restriction is applied to your order…”, when Coupon applied

On my Magento 2.2.7 instance, when a coupon is applied in the checkout, the error message "Restriction is applied to your order. Please review shipping details on Shipping step." is displayed for 5 ...
0
votes
2answers
56 views

Error while creating plugin for Sales Rule Colelction

I am trying to create afterSetValidationFilter plugin for the Magento Sales Rule collection for implementing multiple coupon code option. Core file I want to override Magento\SalesRule\Model\...
1
vote
1answer
22 views

How to create coupon for the Configurable Product/Products. magento2

I'm applying coupon on the configurable product like now when I apply this coupon on the specific product then it cannot be applied and gives me an error The coupon code "Code-5cd3eadf39cda" is ...
1
vote
0answers
121 views

Getting Invalid Coupon messages on order placed - Magento 2

I am getting that following messages on placing the order. Any Help will be appreciated, Thanks
0
votes
0answers
13 views

Block remove from Home page on specific condition

I Make a promotion rule in which set coupon code , Uses per Coupon is 20 and Uses Per Customer 1. override newsletter email template and set coupon in mail. when any user subcribe newsletter then get ...
2
votes
1answer
49 views

Create coupon that sets the shipping rate to a specific amount

I need to create a coupon that sets the shipping rate of an item to a specific amount. For instance, if the customer purchases any item and uses this specific coupon code (cart rule), their shipping ...
0
votes
0answers
61 views

Apply discount only if subtotal of products is greater than a certain amount

I need to create a cart price rule which will be applied only if: Subtotal is greater than 2000. The products forming the subtotal must be non-discounted. The products forming the subtotal must ...
0
votes
0answers
25 views

How to set the coupon on the specific product using SKU. Magento 2

I followed this code $price = 100; $sku = '24-WG085'; $discount = ($price - (($price + 1) / 2)); $shoppingCartPriceRule = $this->_objectManager->create('Magento\SalesRule\Model\Rule'); $...
1
vote
0answers
23 views

magento 2 apply default discount code

I am working on magento 2.3.0 and checkout is working fine with discount. I have created discount code named 95TEST which discount 95% on order total. Now, Every time when customer redirect to ...
1
vote
1answer
31 views

How to create buy one get one promotion in magento

I used Buy X get Y free option.But That promotion is not working.Can any one suggest how to create this coupon.
1
vote
1answer
224 views

How to create Sales rule (Coupon) in magento 2 programmatically

I created the coupon in function its works perfectly now I want to apply sales rules (apply on specific product) my code is public function setCoupon() { // $this->_state->setAreaCode('...

1 2 3 4 5 7