• Resolved midoriatelier

    (@midoriatelier)


    Hello, how are you? Congratulations on the plugin!
    I wonder if the following can be done:
    If it is possible that the gift card does not consider coupons for any automated discounts. For example: I have a coupon for 15% off paying by bank transfer. I wonder if it is possible to skip that coupon.

    Also apply the code where you avoid taking shipping prices.

    Thanks in advance for the help!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author pimwick

    (@pimwick)

    You can prevent any coupon from being used if there is a Gift Card applied to the cart. See this page in our FAQ for details:

    https://www.pimwick.com/pw-faq/do-not-allow-coupons-when-redeeming-a-gift-card/

    Can you clarify what you mean by “apply the code where you avoid taking shipping prices”?

    Thread Starter midoriatelier

    (@midoriatelier)

    Sorry, my mistake.
    With the shipping, I meant that I already applied the code so that the gift card excludes shipping prices. I used this code and it works perfect:

    function custom_pwgc_eligible_cart_amount ($ eligible_amount, $ cart) {
    $ eligible_amount = $ cart-> subtotal;

    return $ eligible_amount;
    }
    add_filter (‘pwgc_eligible_cart_amount’, ‘custom_pwgc_eligible_cart_amount’, 10, 2);

    Maybe I wasn’t as clear as I should be.
    If possible, I need the Gift Card to be applied in the subtotal, before applying the code with the 15% off paying through bank transfer. It’s possible? because when it is applied to the total, I have a different price.

    I hope it can. Thanks a lot.
    Agus

    Plugin Author pimwick

    (@pimwick)

    By default, the gift card works like cash and applies to the Total (after taxes, shipping, fees, etc). The customer can use it to pay for the Total.

    If you want the gift card to work like a Coupon (apply before taxes, shipping, fees, etc) then this needs to apply to the Subtotal instead.

    You can find out how to do this at our FAQ page here:

    https://www.pimwick.com/pw-faq/when-redeeming-a-gift-card-apply-to-subtotal-instead-of-total/

    Thread Starter midoriatelier

    (@midoriatelier)

    Thank you, I already applied it to the subtotal. My problem is that within the subtotal, a coupon that I offer is applied first before the gift card. Is it possible to make the gift card apply before any coupons within the subtotal?

    Sorry for all this trouble and thank you!

    Plugin Author pimwick

    (@pimwick)

    In the guide, the priority is “10” which means it will fire later. Try changing this to “1” instead:

    ...., 10, 2 );

    becomes

    ...., 1, 2 );

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Avoid automatic coupons’ is closed to new replies.