On my Woocommerce shop I have a percentage based shipping cost. The percentage is set to 5 ([fee percent="5"]) which returns a wrong calculation, but interestingly enough it seems to be the separator that is placed wrong (see attached example). 5% in the example is 14.5 GBP, but Woocommerce returns the calculation as 1.45.
Any suggestions?
THANKS
Related
We've a webshop built in Woocommerce and we accept crypto payments (Bitcoin, ETH etc).
Since we're based in the EU we need to calculate tax on our prices.
So every customer that's inside the EU needs to pay tax.
We've displayed the prices including tax (0.1 BTC for example). The customer pays 0.1 BTC and there is already a 0.02 TAX calculated within that price.
But what if we get a customer from without the EU? We want them to pay 0.1 BTC as well but then without the TAX rate.
Is this possible within woocommerce?
Thanks in advance!
Mand
Been searching high and low for a solution to this problem. Actually found it just 5 min ago.
Add this to your functions.php
add_filter( 'woocommerce_adjust_non_base_location_prices', '__return_false' );
Read more, https://github.com/woocommerce/woocommerce/wiki/How-Taxes-Work-in-WooCommerce#prices-including-tax---experimental-behavior
WooCommerce calculates the VAT (in this case 20%) per line (wrong), but really should calculate VAT per item (right).
For example, we have a product that is 0.13p (excl VAT), which shows as 0.16p (inc VAT) on the frontend. This is fine as 0.13p + 20% = 0.156p and is rounded up to 0.16p. If you add 5 of these to the cart you would expect to see 0.16p x 5 = 0.80p but instead we get 0.78p. My guess is that WooCommerce is calculating the VAT per line and not per item (e.g. 0.13p x 5 = 0.65p and then 0.65p + 20% = 0.78p). See below.Wrong Amount
I have tried all sorts of different settings with no success, this is how they are now (see pic attached).Tax Settings
Has anyone experienced the same issue? Have you found a solution? Obviously, I can't launch this with such a bug.. Many thanks!
Pretty much I want to increase the shipping cost depending on the number of items in order... e.g. by default shipping cost is 10$ but when number items goes beyond 20 it will add 3$ to shipping cost so it would be 13$
I tried changing codes but it's complicated somehow
I had to find all places that include shipping tax like in 1-blockcart module, 2-one page checkout, 3-payment, 4-inserting to database... And then change some codes. And it's a lot of work and hard
Prestashop includes a shipping range functionality. You can define shipping cost depending of the total weight of your products.
If you want a simple implementation, you can define all your products weight to 1Kg and add shipping cost ranges like those:
0kg => 20kg : 10$
20kg => 40kg : 13$
40kg => 99999kg : 15$
I need to find a way to create Negative product prices in Magento.
We use Magento both as Online shop and POS and in POS we sometimes need
to give a certain discount that simply can't be accomplished with coupons or shopping cart rules.
I did some googling but nothing turned out. Does anybody know how I could create this?
Example:
1 x Apple iPhone 6 - € 699,99
1 x Discount with subscription from provider X - € -100
Total : € 599,99
Thanks in advance!
Why can't you use coupons?
Another possible way to go with is a configureable product option. You need to setup this for each product, however. An option can have a negative price, in your case -100€. You can include an description as text on invoices, but it won't show you "599.99-100.00 = 499.99" but just "499.99" as row total price.
i am working on a plugin for prestashop, i am done with it, but i have stumbled on to an issue.
The program flow is as follows:
A person places an order at the eCommerce website, the order is accepted, the order details such as items, prices, taxes, discounts etc is send to an external invoice API service.
An example of an order could be:
(These prices include taxes)
1x T-shirt 20.64
1x Shipping 125
1x Discount -18.58
(In this particular test case, the discount is 90% off the product, the math is simple 20.64 * 0.90 = 18.58)
Order total after tax is applied: 127.06
This is all fine, but, when i send the details off to the API, the order is saved as the following:
(These prices are saved without tax applied, the tax rate being 25%)
1x T-shirt 16.51
1x Shipping 100
1x Discount -14
Order total after tax is applied: 128.14
As you see, the order totals do not mach, the difference is 1.08, i am thinking this a discount & tax issue.
Its worth noting that the external site does its own math on the values sent, e.g products, tax etc. I cannot influence the way the external invoicing site does its calculations. I think the issue occurs in the order of which the operations are performed on the different platforms.
Its also worth mentioning that the code works perfectly fine when there is no discount present.
What can i do prior to sending the values, so that i get the prestashop price at the external service?
Let the value of the items be v_1 (t-shirt), v_2 (shipping) untaxed values, respectively.
Case 1.
1.25*v_1+1.25*v_2-0.9*1.25*v_1 = 127.06
Case 2 (tax at end)
(v_1+v_2-0.9*v_1)*1.25 = Same as Case 1 after expanding the brackets.
The figure which is amiss is, as you suggest, the -14 discount, which is more like -0.9*16.51=-14.86.
1.08 difference
There is a difference of 86 cents/pence, whatever, between the untaxed discount values. After taxes this difference grows to, 0.86*1.25=1.08, which explains the discrepancy.
To fix the code, the discount calculation needs to be fixed, unless there are other tax considerations that apply to discounts, etc. In other words why is -14 being used, rather than -14.86?
To you second point about the order of events, this should not impact anything - unless discounts are taxed differently.
Fix
Either
The discount calculation is wrong (i.e. 14 should be 14.86), or
The discount value of 14 is correct, in which case a different (tax/discount) methodology than what is being assumed and this needs to be ascertained before you can make a fix for it.