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”?
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
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/
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!
In the guide, the priority is “10” which means it will fire later. Try changing this to “1” instead:
...., 10, 2 );
becomes
...., 1, 2 );