Hi.
The Coupon I created is for 15% off $30 or more. If a user clicks the magic coupon link, then views a product, the price displays as discounted. If the product price is less then $30, a warning is displayed that the coupon is for $30 or more. If a user then views the cart page, the coupon is not attached to the order. If they then increase a quantity of products already in the cart to meet the $30 or more coupon requirement and selects Update Cart, they still get the error that the cart total doesn’t meet the requirements of the coupon. If a user plays around with the quantity and updates their cart a few times, it will eventually be applied correctly.
Hi,
I am trying to this plugin, however I see that when using the URL (/?mcoupon=XXXX) the price is displayed reduced on the product page as expected however in the cart the same discount is applied again to the already reduced price. So if I use a 10% discount, the customer will end up getting a 20% discount!
Any idea why?
]]>I’m using the WooCommerce Subscriptions. https://woocommerce.com/products/woocommerce-subscriptions/
I have a coupon for a recurring discount of $100. When I enable the magic coupon for this and go to my shop page I get a notice that the product is on “sale” and I see the cross out of the price, but the price is not reduced and no where does the coupon show up as being applied.
]]>Is there anyway to show the original price with a strikethrough or something? It can be confusing to someone if they land on the site with the cupon url and the price has changed but they think maybe that is the original price.
]]>i don’t know if it’s a problem with the current woocommerce version. But using a coupon with only free shipping, it doesn’t apply automatically. Only with any value in the coupon
]]>Hi and congrats for this plugin, it’s really unique on the market and unbelievable useful!
Sometimes I need to set a URL-coupon that wouldn’t apply a discount (I mean, a % or $$ subtracted from the actual product price) but set all the interested products ti fixed final price.
Imagine I have some products in the catalogue with different prices and I would like to give out a coupon which offers flat-price for any product. Something like an “happy hour”: ONLY FOR TODAY, ALL AT JUST XX$”. And obvioulsy I’d like to apply this coupon via url, letting people see the discounted prices directly in the catalogue page since their first visit.
Do you think it can be possible by extending your plugin?
Thank you!
Matteo
When I try to apply the coupon when mini cart opens the discount is applied two times, but if i update the quantity or go to checkout the problem soves itself.
I belive this might be some issue with my mini cart updating via ajax.
Can you tell me if i’m doing anything wrong?
This plugin is awesome and i am really looking forward to use it ??
Best Regards,
Guilherme
PS: Sou Português, se preferirem responder em Português é igual ??
]]>Hello,
It’s a good idea to show the after coupon price on product page.
However it seems that I need to click enable URL coupon for each coupon manually. So this is difficult to do when coupons are dynamically generated.
Is there a way to automatically enable URL for every coupon?
Thank you.
]]>Hey there,
Thanks for the great plugin.
I have seen quite some errors in my debug.log like this one:
PHP Notice: Undefined variable: discount in /public_html/example.com/wp-content/plugins/magic-coupon/includes/class-magic-coupon.php on line 203
It is related to that method:
public function manipulate_get_price( $base_price, $_product ) {
//Only on the main product
if ( $this->coupon_is_valid_for_product( $this->coupon, $_product->get_id() ) ) {
$coupon_amount = $this->coupon->get_amount();
switch( $this->coupon->get_discount_type() ) {
case 'percent':
$discount = floor( $base_price * ( $coupon_amount / 100 ) );
break;
case 'fixed_product':
$discount = $coupon_amount;
break;
}
$base_price = $discount < $base_price ? $base_price - $discount : 0;
} else {
//NOT VALID
}
return $base_price;
}
There is no default case in the switch
statement which is making the $discount
undefined. I have added a default case that is equal to null and before doing the $base_price calculation I’m checking if the $discount is not null. Also don’t think you need that else statement. Here how the edit code looks like:
public function manipulate_get_price( $base_price, $_product ) {
//Only on the main product
if ( $this->coupon_is_valid_for_product( $this->coupon, $_product->get_id() ) ) {
$coupon_amount = $this->coupon->get_amount();
switch( $this->coupon->get_discount_type() ) {
case 'percent':
$discount = floor( $base_price * ( $coupon_amount / 100 ) );
break;
case 'fixed_product':
$discount = $coupon_amount;
break;
default:
$discount = null;
}
$base_price = ( $discount !== null && $discount < $base_price ) ? $base_price - $discount : 0;
}
return $base_price;
}
Cheers,
Al