Rounding the discounted total price
-
Hi. So I have a bundle which is 3 X the same product.
I do it like this so I can display pack of 3 in feeds for ads, but also send to the fulfillment company 3 quantity of the same SKU instead of different products.
Problem is my price is 99 and the pack of 3 is 275. This means the discount is around 7.4%.
But it results in a 91.66 price which is then multiplied by 3 and the final price is 274.98 instead of 275.
I tried rounding the price via a function I found online, but the data is sent through API to the fulfilment software, and although in my site it shows as 275, the API sends it as 274.98.
Can you help me round the total price of percentage discounts so it shows something like 91.66 * 3 = 275?
Thanks
- The topic ‘Rounding the discounted total price’ is closed to new replies.