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
1answer
41 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
22 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
38 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
10 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
26 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
10 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
26 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
34 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
12 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
23 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
62 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
43 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
38 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
34 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
96 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
21 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
27 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
38 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
17 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
26 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
19 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
272 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
15 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
25 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
49 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
513 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
21 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
32 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
25 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
41 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
103 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
12 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
40 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
56 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
24 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
22 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
28 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
197 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
vote
1answer
64 views

How to apply Coupon on the Specific Products in Magento 2?

I want to apply the coupon on the specific product I tried: use Magento\SalesRule\Model\Rule; public function __construct( \Magento\Framework\App\Helper\Context $helpercontext, Rule $rule, )...
1
vote
1answer
27 views

Set Coupen for specific Products. Magento 2

I create the coupon function in Helper which is public function setCoupon() { // $this->_state->setAreaCode('adminhtml'); // $this->_state->setAreaCode('frontend'); ...
0
votes
0answers
13 views

Apply discount on specific product using coupon Magento2

I want to apply the discount. how can I set the coupon on the specific product on which I can also set the product Id's on which the discount apply and how can I set the Price as well and how can I ...
5
votes
0answers
70 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 ...
4
votes
1answer
216 views

How to send a time-limited coupon code to new subscribers?

I'm using Mailchimp for newsletter signups. I'm looking for a way to automatically send a coupon code to my new subscribers. I want the coupon to expire after 3 days. Is there any extension that could ...
2
votes
0answers
44 views

How to use Coupon in magento 2

I create a Coupon code from magento2.2 - programmatically create coupon this code now I have some questions 1) how can I test this code that is it working or not . 2) How can I get this coupon ...
1
vote
0answers
40 views

Magento 1.9 add coupon code to payment page

I want to add the coupon code to the payment page. That works perfect, but when a coupon code is applied, it redirects back to the cart. Is there a way to add the coupon code, without redirect to ...