Questions tagged [coupon-codes]

Denote questions related to coupon codes or promo codes

Filter by
Sorted by
Tagged with
9 votes
1 answer
11k views

Magento Multiple coupon apply on cart

I have been working for 2 days for applying multiple coupon on cart I know there are modules which are available for that. But i don't want to use it. I want some custom code so that i can apply more ...
Zahirabbas's user avatar
  • 2,073
9 votes
2 answers
4k views

Set coupon expire date for individual coupon

I want to create coupon code and I need to set also expiration date. Magento offers to set expiration date only for promotion rules and it affects globally all coupons inside this rule. Anyway inside ...
JohnyFree's user avatar
  • 1,539
7 votes
2 answers
7k views

Is there a way to pass a coupon code as a URL parameter?

I would like to create URLs which activate a specific coupon. It could be as simple as passing the coupon code as a URL parameter. When a coupon is passed, I'd like it to automatically be populated ...
MarkE's user avatar
  • 1,479
6 votes
2 answers
19k views

How to check if shopping cart price rule applied to quote

I have a shopping cart rule setup which applies a discount if the product has a specific attribute - there's no coupon code involved. Throughout the site I just need to check whether or not that ...
denton101's user avatar
5 votes
2 answers
3k views

How do I apply coupon codes for newly registered customers only in Magento 1.9?

How do I apply coupon codes for newly registered customers only in Magento 1.9?
Radha Krishna's user avatar
5 votes
4 answers
3k views

How to get Coupon Code on Success Page in Magento 2

I am trying to get coupon code created in cart price rule from backend on success page. I am doing it as: In Block file public function getCouponCollection() { $om = \Magento\Framework\App\...
Ajwad Syed's user avatar
  • 1,591
5 votes
1 answer
11k views

Apply discount to only 1 item in the cart via Shopping Cart Price Rules

The situation is simple – I want to offer 25% discount on one product in the cart. So if you order 5 of Product A and 3 of Product B, you should receive 25% off either one of Product A or one of ...
bogeylicious's user avatar
4 votes
1 answer
2k views

Check if coupon code already exist in magento 2

I try to create a code to generate a lot of coupon code randomly, but the problem is i need to check if the coupon code already exist or not, is there a way to do this?
Hunter's user avatar
  • 1,484
4 votes
3 answers
3k views

How to generate a coupon code for a specific rule in magento 2?

I need to generate coupon code for a specific rule after the order is placed. I am checking the sale-rule module. It will helped me if anyone know which class is actually I should use.
user avatar
4 votes
1 answer
3k views

How to apply only valid coupon codes to shopping cart programmatically?

I have a number of coupon codes which i want to apply to the cart programmatically. I have done it like this: foreach ($coupons as $coupon) //$coupons array of coupon codes { Mage::getSingleton('...
Haris's user avatar
  • 869
4 votes
1 answer
184 views

Magento2: Order success create coupon

I want to generate coupon on order success below is the code i am unsing to generate in Observer public function __construct( \Psr\Log\LoggerInterface $logger, \Magento\SalesRule\...
Paras Arora's user avatar
4 votes
1 answer
2k 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 ...
Ashish Viradiya's user avatar
4 votes
1 answer
563 views

Custom error message for invalide coupon code magento2

I want to be able to set a specific error message for when the criteria of a promo code is not met. For eg. I have promotion rule for t-shirt qty 1. Entered valid promo code No tshirts in shopping ...
Rahul Hedaoo's user avatar
4 votes
2 answers
3k views

Apply Magento Coupon in Ajax Without Redirecting to Cart Page

I have coupon code on sidebar on my product categories list, cart and checkout page. Whenever I'm trying to add coupon code while being on the product or category list page or checkout page, it is ...
Shoeb Mirza's user avatar
3 votes
1 answer
3k views

Coupon code only applicable for certain product?

Is it somehow possible to make a coupon code in the cart only applicable if a certain product is in the cart and only this product, no other products at all except one defined product? Possible with ...
EOB's user avatar
  • 265
3 votes
1 answer
6k views

Using the same Coupon code for multiple Price Rules

Does anyone know if it's possible to use the same Coupon Code for multiple price rules. I want to give 10% off Category A and 7% off Category B, if they have any of the qualifying products in their ...
doubleplusgood's user avatar
3 votes
2 answers
8k views

Magento 2: Get Coupon Code for Order in Order Success Observer

I created an observer with event checkout_onepage_controller_success_action. I need applied coupon code on checkout onepage success in magento 2. I have to send order coupon code to third party with ...
Pankaj Sharma's user avatar
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 ...
Michał Kuliński's user avatar
3 votes
1 answer
90 views

Coupon code creation in magento

I have created a new discount coupon code (2014SALE) of 10% discount for a particular category (say Car). It is working fine. But my requirement is to create an another discount of $75 for a ...
Soumya's user avatar
  • 33
3 votes
2 answers
4k views

Custom AJAX discount-form not processing coupons

Running Magento 1.9.0.1 CE I've created an AJAX version of the discount-form used in Magento to process coupons in Magento with the help of this tutorial: http://www.lelandcope.com/2012/04/how-to-...
sparecycle's user avatar
  • 1,469
3 votes
1 answer
3k views

Magento Coupon Codes Not Working When Customer Logged In Since Failed Upgrade

Ever since a failed upgrade from 1.8.1 to 1.9.1 (rolled back now) coupon codes don't work for customers that are logged in. Works fine when not logged in. I just purchased an extension that lets me ...
user avatar
3 votes
1 answer
998 views

Script for multiple coupon code generation for CE 1.5x

Can anyone help me with the script and explanation to generate multiple coupon codes programatically since this feature is not present in Magento CE ver 1.5x. Thanks.
Swetha's user avatar
  • 496
3 votes
2 answers
2k views

Apply bindings and subscribe on change of discount amount totals.totals() in Magento 2

in my checkout page when promo code is applied, I am updating a text using some calculation using knockoutjs In my checkout page, on applying and removing promo code, it changes the discount key in ...
summu's user avatar
  • 847
3 votes
2 answers
940 views

Magento2: Change order status to processing if any specific coupon code has been applied

How can I change the order status to "Processing" automatically if any specific coupon code has been applied during place order in Magento 2?
Suman Pradhan's user avatar
3 votes
1 answer
5k views

Apply Coupon code to programmatically create reorder

I want to apply previous order coupon code for second recurring cycle. My code is as below which is running for second recurring cycle. $order = Mage::getModel('sales/order'); $...
John's user avatar
  • 863
3 votes
1 answer
179 views

Coupon Code £5 off / £50 spent, £10 off / £100 spent (but not 10% off)

I want to make a single code which gives you £5 off per £50 spent... So if you spend £250, you get £25/off however if you spend £220 then you only get £20 off. (Note that its not 10% off...) Any ...
Henry Aspden's user avatar
3 votes
2 answers
519 views

Magento: Buy 3 pay for 2 does not work for me

I like to set a "Buy 3 pay for 2" item rule. I have created a "Cart Price Rules" but it does not seem to apply. If I add 3 of the same items or 3 different items it still results in the original ...
user3091199's user avatar
3 votes
0 answers
145 views

How to Add discount code form to multi shipping address

I have been working for 2 days for applying multiple coupon on cart I know there are modules which are available for that. But i don't want to use it. I want some custom code so that i can apply more ...
Rv Singh's user avatar
  • 1,617
3 votes
0 answers
2k views

Magento Coupon code is not valid

I am using Magento 1.9.0.1 and I am trying to use the magento coupon code feature. However, it's not working when I add any condition on subtotal. My condition is if the subtotal is greater than or ...
Mohammad Faisal Ahmed's user avatar
2 votes
3 answers
7k views

Message is added to queue, wait to get your coupons soon

I'm trying to create auto generate coupons in magento 2 but its showing as below: Message is added to queue, wait to get your coupons soon Any help will be appreciated?
MagentoDev's user avatar
2 votes
2 answers
487 views

Promotinal coupon generation problem

I need to create a promotional coupon for my Magento site. From admin> Promotions> Shopping Cart Price Rules , I added coupon description what I need. But when I go to the "Manage Coupon Codes" ...
Subhajyoti De's user avatar
2 votes
1 answer
821 views

Get RuleId from Coupon Code in checkout\cart\item\default.phtml

I have overridden the checkout\cart\item\default.phtml in my theme. To get the 'used' coupon code I've found below rules in other questions: $getCoupon = $block->getLayout()->createBlock('...
user3086053's user avatar
2 votes
1 answer
2k views

how to show Promo code or coupon code on Checkout page in magento 1.9

How can i show Promo code or coupon code on Checkout page in magento 1.9. And we can have option in admin panel or we do by code? please help me!!!
Muhammad Hamza's user avatar
2 votes
2 answers
2k views

Apply free shipping coupon code only for spefic shipping method

in project i have two different custom shipping method one for 8 to 15 days delivery and 2 to 4 days delivery. i have create coupon code for free shipping but i want to allow free shipping coupon code ...
Navin Bhudiya's user avatar
2 votes
1 answer
2k views

How to validate custom coupons in magento 2?

I want to validate coupon code which is not in magento sales rules. I have millions of coupons in another table. I want to apply coupon from another table. If user enter any coupon first i want to ...
Ashar Riaz's user avatar
  • 1,035
2 votes
1 answer
2k views

How to get applied coupon code in observer Magento 2?

I want to add a product to cart when a coupon is applied. I created an observer on event controller_action_predispatch_checkout_cart_couponPost. But I don't get the applied coupon code in observer. ...
Hima Mohan's user avatar
2 votes
2 answers
3k views

coupon code applying only one one product instead of whole cart

we created shopping cart price rule to give 50 % discount for all cart subtotal. but coupon code is applying only for one product. in cart 2 items, Product 1 [ price - 100] , Product 2 [ price - ...
Baby in Magento's user avatar
2 votes
1 answer
5k views

restrict coupon codes for only one time use in magento 1.9.0

For orders above 200, we are giving free shipping on our site. We would also like to have a "Free Shipping " coupon code applicable to orders below 200 I gave Uses per Coupon : 1 , Uses per ...
Baby in Magento's user avatar
2 votes
1 answer
339 views

Magento 2.3 : Add free product in a cart after applying coupon

How to add product in a cart with custom price 0 after coupon code success. what is the way to achieve this. pls help me with the couponcode success event name.
Mahendra's user avatar
  • 716
2 votes
1 answer
358 views

get Coupon Code in beforePlaceOrder

Hello I want to get the coupon code in a plugin. My code is: private $logger; private $checkoutSession; public function __construct( \Psr\Log\LoggerInterface $logger, \Magento\Checkout\...
vDrews's user avatar
  • 57
2 votes
2 answers
1k views

Apply coupon code only to non discounted products

I need to make a coupon code which should be applied only to non-discounted products and certain categories. In Cart price rules->Actions I tried the following conditions: If ALL of these ...
GenZ Dev's user avatar
  • 590
2 votes
1 answer
3k views

how to retrieve Coupon Code by rule Id on Checkout Success Page?

I have coupon rule collection created at admin side and displaying rule names in the system configuration of the custom module. Actually, I wanted to get coupon code of a cart rule that has been ...
Ajwad Syed's user avatar
  • 1,591
2 votes
1 answer
3k views

Coupon Code API Params

We just want to know what would be the json params to create coupon code from magento2 rest API. The API we are using to generate the coupon code is /rest/V1/coupons
harish's user avatar
  • 91
2 votes
4 answers
2k views

Promo code for particular SKU

I am unable to put a conditional promo code for SKU. While I am selecting the SKU attribute it's showing "is assigned" or "not Assigned" instead of putting a particularity SKU code. Can anybody help ...
user48055's user avatar
2 votes
1 answer
2k views

Create Shopping cart promotion rule using SOAP API [closed]

How to create Shopping cart promotion rule using SOAP API?
Sandesh's user avatar
  • 1,649
2 votes
1 answer
1k views

How does magento calculate max uses per coupon for a promo rule

I have observed that customers can no longer apply a specific promocode to their orders although the uses registered per coupon are lower than the value set in the rule. The only way I have to solve ...
Yess's user avatar
  • 21
2 votes
1 answer
249 views

magento 2.4 check coupon in checkout page

On my magento 2.4 I have a few coupon codes that should only be available to the admins via backend, which means that the customers on the frontend should not be able to use them. I was able to ...
Lou Nik's user avatar
  • 443
2 votes
0 answers
582 views

Magento 2 checkout, I need to display or hide a shipping method depending on if a coupon code was entered and is valid. How can I do this?

I have a price rule attached to the flat rate shipping method as an option, and I want to intercept when the coupon is added, so that I can hide this flat rate method unless the coupon code matches ...
Justin Collins's user avatar
2 votes
0 answers
96 views

Magento 2 Coupon code restriction

I'm trying to modify the coupon code scenario and below is the scenario that I need to achieve. Full cart total should be >= $499. I added the condition that if a configurable product is found in ...
Ronak's user avatar
  • 797
2 votes
1 answer
545 views

Coupon Code Discount for Product in Certain Categories

I'm trying to create a coupon code that will apply a discount to an item in a cart if it is in a certain category but won't discount other items that are also in the cart. I tested out what I created ...
Ana S's user avatar
  • 21

1
2 3 4 5 6