WooCommerce 20% discount coupon and Free shipping - php

We run a webshop and orders over $35,- get free shipping. Working as it should.
We also have 20% discount coupons. Also working as it should.
Now a client emailed us with the following:
She has for $40,- of items in her shopping bag and also a 20% discount code.
Before she applied the discount code free shipping is active. But after adding the discount code the total order value is les then $35,- (it is $32,-) and the Free Shipping is gone and she has to pay the Shipping costs.
Totaly makes sense but is there a way to avoid this? So the discount is not part when calculating the total cart value so she still has Free Shipping?

Related

WooCommerce Coupons to apply to entire cart, fees and taxes

When we sell tickets with WooCommerce, we've added a handling fee per ticket. The fee part is working fine, using the
WC()->cart->add_fee().
However, if we apply a coupon, the amount it substracts does not take into account the fees.
So, the customer would still need to pay the fee. We'd like for the coupon to also apply for the fees.
Not knowing php that well, I have tried finding the function for coupons and the cart, interpreting them, but unfortunately it didn't help me much in understanding what I could change to make coupons apply to the cart total amount.

While switching betweet the shipping method i.e. free, zip base and fixed ect total cost did not change for subscription product

I am using woocommerce subscription and woocommerce all product subscription plugin for subscription product. The issue that I am facing is in shipping. When issue is the shipping cost is not adds to the total cost in the cart when I try to change the shipping method i.e. zipcode based, fixed and free.

Woocommerce fixed cart discount code. Discount appear as a reduction on the product and not on the cart

Hope your doing well today!
Well I'm facing something and I don't know if it's editable or if I can do something about it.
Basically on a WordPress site with some product and reduction code with the Woocommerce core.
They (the client who mandate the site) always use the fix reduction on the cart but in the order tab of woocommerce when we check an order the discount appea on the product(s) for exemple if I have 3 product in my cart and a fix discount: 50.
Everything is fine for the customer they have the reduction but in the backoffice if I check the order page and the recap the reduction apply on the cart and not split between product as show on the image.
Basicely what they asking me is how to apply only in the order/invoice/etc the reduction on the cart and not displying it to the product(s)
I hope i'm clear with my question if u need more information don't hesitate.
Thx everyone !

Woocommerce Tax always including tax

I am using a table rate shipping option.
I tested two plugins so far, but for both plugins woocommerce seems to calculate the tax wrong.
1: https://de.wordpress.org/plugins/table-rate-shipping-for-woocommerce/
2: https://wordpress.org/plugins/woocommerce-easy-table-rate-shipping/
The problem is, that we are using the option "shipping tax based on cart items"
So I am entering in the table the shipping cost excluding tax.
For example (correct calculation):
Shipping to netherlands 13,99 €
For books the tax (7%) should be added on top, so total: 14,97€ for shipping.
Woocommerce seems to calculate it differently:
Shipping to netherlands 13,99 € including tax.
So total is 13,99 € which is incorrect.
the order shows 13,07€ shipping and 0,92€ tax on shipping.
I cant seem to find an option to give woocommerce the information that given shipping cost are entered exclusive tax.
Does anyone know how to correct the problem?
Because we cannot enter shipping costs including tax, because we have different tax classes on our products.
Talking to the developer of the germanizer plugin, which was interfering with the shipping rates, we found a solution.
Problem was, the Germanizer plugin, calculates shipping according to the pre-tax values not the net vaues.
thats why the shipping cost was always wrong.
Deactivating it, helped. Or setting the pre-tax shipping inside the table rate plugin helps aswell.

Magento - Determine if coupon code applied on cart page is for 'FREE SHIPPING'

Does any one know how to determine that the coupon code applied on shopping cart page is for Free Shipping through code?
I have a Shopping Cart rule created for FREE SHIPPING which works fine. But if a customer hasn't yet chosen his shipping delivery options then its confusing for them coz the coupon code does nothing for them atleast on the cart page.
They see FREE SHIPPING option on the checkout/onepage.
Hence I would need this information so that I can display the customer a valid message that the 'Coupon is applied and FREE SHIPPING option would be available to them in the next stage of Checkout'
Any ideas which file to look for and what piece of code can help me determine that my coupon code in question is for FREE SHIPPING ?
You should have a look in Mage_SalesRule_Model_Validator and than the method public function processFreeShipping(Mage_Sales_Model_Quote_Item_Abstract $item). That's where the free shipping is calculated.
You can modify/extend this to save something in session and use that to detect on frontend when the cart has free shipping or not.

Categories