• Resolved egocefalo

    (@egocefalo)


    Hi, first of all thanks for the plugin!

    I’m using the quantity discount, when a discount is applied to an item this discount is treated as a coupon on cart, so if a customer tries to apply a coupon to a cart containing an item with a discount applied and the coupon is set as not combinable with other coupons then the cart gives an error and the coupon has to be removed from the cart because there’s no Remove button for your plugin’s discount.

    The discount generated from your plugin doesn’t give the option to be removed from the cart (while coupons do have a Remove button), so the customer is forced to remove the coupon in order to complete the purchase even when sometimes they would have preferred to remove the discount.

    Is there a way to add a Remove button to your plugin’s discounts on cart?

    Thank you!

    Best regards,

Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Support ijas

    (@ijasacodez)

    Hi, Thanks for the feedback.

    Our plugin uses virtual coupons for applying discounts and this coupon will get auto-applied to the cart even if we remove the same (currently remove button is hidden with CSS), on refresh the discount/coupon will be applied to the cart.

    We have passed the same to our development team, we will check if we can add an option so that users will have the option to remove the discount coupon from the cart.

    Please share your website URL and coupon code, so that we can have look at the error.

    Thread Starter egocefalo

    (@egocefalo)

    Hi @ijasacodez

    Here is a direct link to the items eligible for the quantity discount, please add 5+ of any for the discount to be applied: https://www.flukyfabrics.com/bulk-discount-fabric/

    And you can use the following coupon code: TESTCOUPON

    Thanks a lot for your help!

    Best regards,

    Hi, any progress here? Is there a way to remove quantity discount if the customer applies a coupon?

    Thread Starter egocefalo

    (@egocefalo)

    Hi @filesubmit

    Still waiting.

    ?? I had to make things work as my client was in hurry, so I did the following workaround:

    1. Navigate to: /wp-content/plugins/aco-woo-dynamic-pricing/includes
    2. Edit class-awdp-discount.php
    3. Find public function applyFakeCoupons()
    4. After $coupon_code = apply_filters(‘woocommerce_coupon_code’, $coupon);
    add the following:

    $myCoupons = array(‘coupon1’, ‘coupon2’, ‘coupon3’ );

    if ( array_intersect($myCoupons, $woocommerce->cart->get_applied_coupons()) ) {
    WC()->cart->remove_coupon($coupon_code);
    }

    And finally modify this:

    if ( !in_array($coupon_code, $woocommerce->cart->get_applied_coupons()) && $this->discounts && true == $this->apply_wdp_coupon && WC()->cart ) {

    to this:

    if ( !array_intersect($myCoupons, $woocommerce->cart->get_applied_coupons()) && !in_array($coupon_code, $woocommerce->cart->get_applied_coupons()) && $this->discounts && true == $this->apply_wdp_coupon && WC()->cart ) {

    Save and test.
    The minus here is that:
    – this is hardcoded in plugin file
    – you should reapply the changes after every plugin update
    – you hardcode each coupon name in the code above

    Thread Starter egocefalo

    (@egocefalo)

    Hi @filesubmit

    Thanks a lot!, I’ll try it right away.

    Best regards

    Thread Starter egocefalo

    (@egocefalo)

    Hi @filesubmit

    I tried it and it works perfectly, the coupon is applied instead of the discount without any conflict, you can even remove the coupon afterwards and the plugin’s discount is applied again and so on.
    The only thing is that the notice “sorry, coupon “couponcode” has already been applied and cannot be used in conjunction with other coupons” still shows (twice), but other than that everything is correct.

    Thank you so much!
    Best regards,

    Plugin Support ijas

    (@ijasacodez)

    Thanks for the code, maybe in our coming updates, we will try to integrate the same to our plugin, an option that allows removing the discount/coupon (plugin discount) when any other coupons get applied to the cart.

    By default woocommerce coupons do have an option to enable individual use only mode, which will remove/disables all other coupons from the cart.

    For enabling the same:
    – Navigate to Woocommerce Coupons admin screen
    – Edit / Create a new coupon code
    – Navigate to the usage restrictions tab
    – Enable ‘Individual use only’ mode

    Plugin Support ijas

    (@ijasacodez)

    We have added a toggle in our settings section to enable/disable the feature (‘Disable Discounts When Any Coupons Gets Applied To The Cart’), we are testing the feature on our local / demo servers, you can download the latest version plugin file from the link given below, please check the same and let us know your comments.

    Link: https://drive.google.com/file/d/1akUhm5ba9mpbSb9HaGGoblFm4dVE5c-d/view?usp=sharing

    We will be releasing the official update very soon.

    Great :)) Thanks!

    Thread Starter egocefalo

    (@egocefalo)

    Hi @ijasacodez

    Excelent, exactly what was missing, no problems in the tests I’ve done so far. It’s working on my shop, if you want to try it. https://www.flukyfabrics.com

    Please let us know if you find any problem, I’ll do the same.

    Thanks a lot!

    Best regards,

    Thread Starter egocefalo

    (@egocefalo)

    Hi @ijasacodez

    The notice “sorry, coupon “couponcode” has already been applied and cannot be used in conjunction with other coupons” still shows (twice) after applying the coupon.

    https://ibb.co/Lh32Tn9

    You can check using TESTCOUPON code on my cart, Bulk Discount category has Dynamic Pricing.
    I hope you can fix that.

    Thank you!

    Plugin Support ijas

    (@ijasacodez)

    Ok, noted, we will check the same. Please try disabling the ‘Individual usage’ settings (coupon settings).

    Thread Starter egocefalo

    (@egocefalo)

    Hi @ijasacodez

    If I disable individual usage from the coupon then Dynamic Pricing discount remains and adds to the coupon discount amount, and it will add to any other coupon, check:

    https://ibb.co/GvnjWT5

    So it’s not what we’re looking for at all.

    Plugin Support ijas

    (@ijasacodez)

    Sorry for the inconvenience, can you please submit a t i c k e t on our acowebs portal, so that we can have a detailed look.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘How to add a Remove button to discounts on cart’ is closed to new replies.