Stack Overflow - Where Developers Learn, Share, & Build
Stack Overflow is the largest, most trusted online community for developers to learn, share their programming knowledge, and build their careers.
Actived: Monday Mar 1, 2021
How to create a coupon code in magento that will apply a
I want to implement a coupon code which will give the user 20% Off on their shopping cart if the value of the discount is less than 500. e.g. Total Cart Value is 10000 20% coupon code applied would give a discount of 2000 However the maximum discount that should be given is only 500.
Magento Coupon code with 100% free in entire whole cart
Magento Coupon code with 100% free in entire whole cart. Ask Question Asked 7 years, 2 months ago. Active 5 years, 10 months ago. Viewed 2k times 0. I need a coupon whith 100% free in entire cart, how I can create it via admin or programatically? If everything is 100% off then that's all you need. Leave everything else blank.
What is the algorithm to determine the best way to
If I have 1 coupon, item 1 gets it for $10 off; If I have 2 coupons, item 1 gets them for $15 off; If I have 3 coupons, item 1 gets 2, and item 3 gets 1, for $17 off; If I have 4 coupons, then either: Item 1 gets 1 and item 2 gets 3 for a total of $25 off, or; Item 2 gets all 4 for $25 off. If I have 5 coupons, then item 2 gets all 5 for $35 off.
Creating a single random Magento coupon - Stack Overflow
So, I'm trying to write a simple script that trips when the "subscribe to our newsletter" form is submitted that will talk to Magento, ask Magento for a single random coupon code, set a few basic price rules (10 bucks off anything, one use per customer, one use per coupon, expires two weeks from generation) and then return a random coupon code
Get coupon data from WooCommerce orders - Stack Overflow
Update 2. First you can't access anymore WC objects properties since WooCommerce 3. You should now use WC_Coupon getter methods to get coupon details from the WC_Coupon Object instance…. In your case you have to use get_discount_type() method or is_type( 'cash_back_fixed' ) method …. Here is the way to do it: