Forums / Setting Up Specials and SaleMaker / Have salemaker price rounded two decimals just as the displayed price?

Have salemaker price rounded two decimals just as the displayed price?

Views: 5,190

Results 1 to 8 of 8
27 May 2011, 3:54 AM
#1
tj1 avatar

tj1

Totally Zenned

Join Date:
Mar 2005
Location:
California
Posts:
628
Plugin Contributions:
0

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:

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.

27 May 2011, 6:37 PM
#2
tj1 avatar

tj1

Totally Zenned

Join Date:
Mar 2005
Location:
California
Posts:
628
Plugin Contributions:
0

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.

2 Dec 2011, 3:15 AM
#3
g_mac avatar

g_mac

New Zenner

Join Date:
Dec 2011
Posts:
5
Plugin Contributions:
0

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

4 Dec 2011, 12:47 AM
#4
tj1 avatar

tj1

Totally Zenned

Join Date:
Mar 2005
Location:
California
Posts:
628
Plugin Contributions:
0

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:

        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;
4 Dec 2011, 11:34 AM
#5
g_mac avatar

g_mac

New Zenner

Join Date:
Dec 2011
Posts:
5
Plugin Contributions:
0

Re: Have salemaker price rounded two decimals just as the displayed price?

That works great. Thank you so much!

Gmac

8 Dec 2011, 3:04 AM
#6
droland avatar

droland

New Zenner

Join Date:
Dec 2006
Posts:
20
Plugin Contributions:
0

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.

28 Dec 2013, 5:02 PM
#7
noernberg avatar

noernberg

New Zenner

Join Date:
Dec 2013
Location:
O
Posts:
7
Plugin Contributions:
0

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.

28 Dec 2013, 6:15 PM
#8
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

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?

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian