Have salemaker price rounded two decimals just as the displayed price?
I use percentage when creating a sale.
The total a lot of times is wrong by a few cents depending on how may items were ordered.
For example, I have a products with a sale price displayed as $4.71, a customer ordered 7 and it shows like these:
Code:
Qty Price(ex) Price(inc) Total(ex) Total(inc)
7 $4.71 $4.71 $32.99 $32.97
Subtotal: $32.99
Based on the displayed price of $4.71, I expect the price to be just that $4.71 x 7 = $32.97, NOT $32.99
The biggest issue this creates for me is that I cannot automatically import these transactions into QuickBooks because it is not in balance.
Is there a setting I can change so that it calculates total just like the prices displayed? Or which is the file that controls the rounding for this so I can take a look and hopefully be able to change it.
Thanks.
Re: Have salemaker price rounded two decimals just as the displayed price?
Never mind, I found it. It was just a simple edit to a functions file.
If anybody needs this let me know and I'll post the solution later.
Re: Have salemaker price rounded two decimals just as the displayed price?
Hi there,
Can you post the solution? I have the same issue to resolve ...much appreciated
regards
Gmac
Re: Have salemaker price rounded two decimals just as the displayed price?
You simply need to use the ROUND fuction in the includes/functions/functions_prices.php file to round to 2 decimals.
Around line 73 for case 1: yuo should have this:
PHP Code:
case 1:
$sale_product_price = $product_price - round((($product_price * $sale->fields['sale_deduction_value']) / 100),2);
$sale_special_price = $tmp_special_price - round((($tmp_special_price * $sale->fields['sale_deduction_value']) / 100),2);
break;
Re: Have salemaker price rounded two decimals just as the displayed price?
That works great. Thank you so much!
Gmac
Re: Have salemaker price rounded two decimals just as the displayed price?
That worked great on regular items.
I have some 'Priced by Attributes' products that it did not affect.
I'm looking in the same file, but can't seem to find the solution.
Re: Have salemaker price rounded two decimals just as the displayed price?
tj1, I wish to THANK YOU for this thread and your post to the necessary changes. :bow: I have been battling this and looking for answers everywhere and am so happy to have found your response. It is the most precise and accurate I have found on this issue, and the fix appears to be working for me and my v1.5.1 Cart.
You would think this would be fixed by now in all of the version upgrades since 2006.
Re: Have salemaker price rounded two decimals just as the displayed price?
Noernberg, droland mentioned it's not working on products priced by attribute, are you able to test?