I would like to increase the price by $20 of all products after every new sell in woocommerce
Exemple:
Starting prices $50
First order : all products prices become $70
Second order : all products prices become $90
Third : all products prices become $110
and so...
I believe this plugin should give you what you want it is a bit outdated so use at your own caution
https://wordpress.org/plugins/raise-prices-with-sales-for-woocommerce/
Hi community I have a pickle of a problem involving TAX, and I really need your help with it. I need a solution whereby if a certain product is added to the cart then the Tax rate for all products that are in the cart drop to the lower tax rate. Here is how this problem arises, one of the products is a service, this product can only be chosen if other products are also in the cart. If the customer chooses this product then the tax rate for all products drops to a lower tax rate, (as the products become part of a service which is taxed here at a lower rate) if the customer doesn't choose this product then the rate remains at the higher rate. - The logic is .. If cart contains product A then tax rate of all products changes to Lower Tax Rate.
I found this code which has a similar logic to it, but not quite there, this changes the tax class based on the subtotal being less than 110. I need to change the tax class based on wether a specific product is in the cart.. I have tried changing "subtotal" to "product" changing the "<= 110" to "= 'fitting' (fitting is the product title) but it didn't work. Any code gurus got any input on this one?
add_filter( 'woocommerce_product_tax_class', 'big_apple_get_tax_class', 1, 2 );
function big_apple_get_tax_class( $tax_class, $product ) {
if ( WC()->cart->subtotal <= 110 )
$tax_class = 'Zero Rate';
return $tax_class;
}
In my cart beside total amount it shows how much amount of tax included. But I want to show the tax rate only ( percentage value just) instead of the amount. Please help how to do this .
Thanks in advance
Shows the tax amount but i want to change it to % vlaue
This should be configurable in the options however, i'm pretty sure u would have to show the total tax value according to laws.
WooCommerce > Settings > Tax > Your Tax Rates
there is a display option.
I want to set up shipping cost on per item basis, but in woocommerce plugin I only get 2 options with flat rate (per class basis & per order basis) there is no per item option.
How can i set up per item shipping cost.
In flat-rate cost field enter rule like -
10 * [qty]
This will add 10 per item.
For a little bit more advanced options you can try out the following plugin
[Updated link] https://www.pluginhive.com/per-product-add-on-for-woocommerce-shipping-pro/
I am building a Prestashop plugin, and i have stumbled on to this tax calculation 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 end up with the same values both places.
The total they compute is indeed (100 + 16.51 - 14) x 1.25 = 128.1375
However their computation of taxless discount is wrong, 18.58 / 1.25 = 14.864 not 14.
Is there a rule that discount should be rounded (or floored or ceiled) to an integer value ?
discount may be non-integer, implying different tax rate
If not that means they divide the discount by 1.32714285714, thus considering there is 32.71...% taxes on discounts. This would be strange and unlikely, since when adding the discount again they use the normal 25%
Check your prestashop documentation, local laws or whatever to find out if this is real, and whether the value is for example 33% or 32.7% Since I reverse-engineered the value from the tax value they stored, it could be distorted by the rounding to 2 decimals.
Then, to get the correct result, replace the discount by discount * 1.32714285714 / 1.25, that is, replace your expected tax rate by the one they apply.
discount is rounded to integer
If the taxless discount does have to be an integer, we can modify it so that it is on our side as well, since I guess what matters most is the final price. So use this algorithm to send in a discount that will finally be an integer:
% get taxless prices
price_notax = price / 1.25
discount_notax = discount / 1.25
% transfer decimal part of discount into price reduction
discount_int = floor(discount_notax)
price_compensated = price_notax - (discount_int - discount_notax)
% re-add tax to get values to send
discount_send = discount_int * 1.25
price_send = price_compensated * 1.25
The sum of values should be the same : price - discount == price_send - discount_send
check if it's not a bug in Prestashop
Update to the latest version, look up their bug tracker or contact them. File a report if there isn't one.
One of the workarounds above will work for now, but if it's a bug that gets fixed and you use the first one, you will be billing wrong amounts again.