Woocommerce discount codes, rounding up rather than down - woocommerce

I'm hoping this is a straight forward fix, but I'm a bit stuck with getting the discount codes to output a rounded up price.
For example if I'm selling a product at £29.95 with a 50% discount - that should be £14.975 - which would round up to £14.98. At the moment this is rounding down to £14.97.
Normally this wouldn't be a problem but the site exports the sales data in a specific format to a distributor who needs to have this discount appear as £14.98 for it to be processed.
Any ideas?

Related

How to only calculate VAT over profits with Quaderno + Woocommerce

I use Quaderno to calculate the VAT over the digital products I sell in my webshop.
However since a short while I have two types of products, one that I buy and sell myself which requires the full VAT to be calculated over the full price.
The second are a marketplace type products, where I pay out 80% to the seller, and keep 20% myself as profit. I use a Woocommerce panel for this (WCFM).
However for the second product, the VAT is still being calculated over the full price. This results in me paying more VAT than I actually earn on the Commission (since I only earn 20%). In this case I only have to pay VAT over the 20% that I take as commission, but I don't know how to configure this.
I assume a specific calculator code would work here but I'm stumped. Hope anyone has some advice!

i want to be sure that woocomerce doesn't sells over the stock

this is my first question and im not a programmer. English isn't my natural Language either.
I need to reduce to 0 or to the minimum possible the chances of woommerce taking orders or accepting payments when the stock reaches 0.
I simulated 2 purchases at the same time and both were received and the stock counter got to -1.
i expect a lot of people buying products at the same time in my website and I want to avoid giving money back because of sells above the stock.
i had another problem with "Mercado Pago" payment method. once an order was already cancelled (due to the time limit) it let the payment be finalised.
thank you very much!
I found out that your issue matches this one: https://wordpress.org/support/topic/negative-stock-quantity/
Also, it could be your payment gateway capturing the payments later or something which is causing the order status to be delayed. In such cases, the stock does go to a negative number which is a known issue.

Woocommerce reduce inventory programmatically when related variation is purchased

Ok, will do my best to explain the problem.
I am selling limited edition prints on my site. They come in multiple sizes, and they also come framed and unframed.
Right now, I set up each product to have 2 attributes: size & frame.
Within the variations, I have 4 options
11x17 unframed
11x17 framed
20x30 unframed
20x30 framed
The problem occurs with the inventory. There are 10 total 11x17 prints, but since I have to enter a stock quantity for each variation, I have to do something like this:
11x17 unframed 10qty
11x17 framed 10qty
Which makes it seems as though there are 20 total prints, instead of 10.
Ideally, I'd want to keep inventory based on attribute, not variation, but there doesn't seem to be a way to do that.
I am unable to set up the Frame as an add-on product because the cost of the frame goes up, as the size of the print goes up.
I am wondering, if there is a way to programmatically reduce the stock of other variations, when one variation is purchased. So, when someone purchases the "11x17 unframed", the "11x17 framed" stock is reduced -1 at the same time.
All of the products on the site are exactly the same, so I wouldn't mind hard-coding the specific variation names in the code.
Not sure if something like this is doable, but I would hugely appreciate any insights.
This is the closest example I could find to customizing how stock is handled:
Reduce WooCommerce Item Inventory By Attribute Value
Thanks in advance,
Jenny

Applying second discount in Woocommerce - after bulk discount

in my online store I have applied a bulk discount (i.e. a percentage reduction based on the quantity purchased). This works great. I also want to apply a second discount mechanism where the customer can select a criteria from a dropdown box and a discount will be applied again. This second category is schedule i.e. daily, weekly, monthly for a service - ie how often the service purchased will be delivered. This will reduce the unit price i.e. for one product.
I am not using a subscription method for this as the customer will be invoiced once a month - i.e. not based on which drop down (daily, weekly) the select.
Any suggestions would be greatly appreciated.

Woocommerce - Rounding Error

I'm trying to fix a rounding error in Woocommerce. It appears that whenever it gets a 5 and needs to round it rounds down instead of up. My client is using two different systems that need to sync but they aren't because of this rounding.
For example one product is $14.10 normally. They have applied a 15% discount to that and Woocommerce shows the total as $11.99 where the other system show it as $11.98. I believe the issue is the discount comes to $2.115. Woocommerce sees the 5 and rounds it down to $2.11 and the other system rounds it up to $2.12.
Is there a way to change the way Woocommerce does rounding so that it will round a 5 up instead of down?

Resources