Login   |   19 Apr 2024 
Support Center » Knowledgebase » 3. Pages and Products » 3-0029-EN-How Rounding is done in ShopFactory?
 3-0029-EN-How Rounding is done in ShopFactory?
Article

1. Currency Rounding

Currency Rounding is rounding values to the nearest decimal place, for the number of decimal places as required for a particular currency. For example, almost all currencies should be rounded to the nearest 2 decimal places, except for the Japanese Yen, where amounts are whole numbers.

2. Product Price Rounding

Product Price Rounding is enabled when the "Round currencies to the nearest" dropdown listbox has a value other than blank. Valid values are selectable from the dropdown listbox. As at 27 Aug 2007 , it permits entering arbitrary rounding factors. However, only 0.01 is known to work well; other values may give strange results.

(as at 27 Aug 2007, post 7.31 Build 7234)
Rounding is applied to raw product prices, and to the result of any calculation that changes the product price such as product discounts and shop-wide discount by percentage. After rounding is applied, the result of the rounding becomes the actual product price.

Thereafter, no other amounts will be rounded - this includes taxes, shipping charges and basket discounts.

3. Basket Total Rounding

(pre-and-including 7.31 Build 7234)

Basket amounts such as total purchase price, tax and shipping charges had Product Price Rounding applied to them. Rounding to a certain factor is required by some payment systems and currencies. For example, SaferPay requires CHF currency amounts to be rounded to the nearest 0.05.

(as at 27 Aug 2007 , post 7.31 Build 7234)
Product Price Rounding is not applied to basket amounts such as total purchase price, tax and shipping charges.

In lieu of this functionality, to satisfy the SaferPay requirement, is a new setting to allow for the rounding of the basket total, independent of Product Price Rounding. Basket Total Rounding is only applied to the basket total, not tax or shipping charges.

3.1 Setting

Two directives in alias.ini control the Basket Total Rounding function.

alias.ini is l ocated in C:\Program FilesShopFactory V7ShopFactoryCommon Files\

RoundTotalEnabled

Default is 1
Setting to 1 enables the Basket Total Rounding function. 0 disables the function.

RoundTotalTable

Default is CHF,0.05;
Specifies the rounding factor for currencies. The format is currency_iso1,rounding_factor1;currency_iso2,rounding_factor2;etc For example CHF,0.05;GBP,0.10; specifies that CHF totals should be rounded to the nearest 0.05, whilst GBP totals should be rounded to the nearest 0.10.

3.2 Example

If Basket Total Rounding is set to 0.05 for CHF, there is a product discount of 7.25%, and tax of 9.25%:

Product 1 (exc tax): CHF39.75
Discounted to: CHF36.87 <== 39.75 * 0.9275 = 36.868125
Tax: CHF3.41 <== 36.87 * 0.0925 = 3.410475
Total: CHF40.30 <== 36.87 + 3.41 = 40.28

 

 



Article Details
Article ID: 703
Created On: 20 Sep 2007 12:00 AM

 This answer was helpful  This answer was not helpful

 Back
 Search
 Article Options
Home | Knowledgebase | Downloads
Language:

Help Desk Software by Kayako SupportSuite v3.70.02