chrometweaks.org

What do I enter in the 'HOST details for iPage?

Click Here To View All Answers...


First of all What do I enter in the 'HOST details for iPage? Thanks for any answer. My 2nd question... Fisrt sory but my english is bad, but I try it to tell them whats going wrong.

In Chile my country we using pesos this peso don't use decimal.

Explain: everething cost an exact value 200, 205, 200 without decimal.

Thas is why I seting the oscommerce for not using decimal with my currency.

The problem is I enter the value of all my products in dollar the chanche of that is 618 and the tax for my country is 19%.

The oscommerce give me this.

Example:.

50x1,19=60x618=$37.080 But this is wrong.

The real value is:.

50x1,19=59,5x618=$36.771.

In less words the problem is in the formula, the formula round the values until I need to do.

The correct formula is.

50x618=$30.900x1.19=$36.771.

Where I can chanche this I look for everithing and everithing dosent work..

Salu2.

Marcelo.

This post has been edited by.

MadBox.

: 22 April 2004, 20:19..

Comments (88)

That's a good question. I'm not sure what is the answer to that question. I'll do some investigation and get back to you if I got an answer. You should email the people at iPage as they probably could give you an answer..

Comment #1

The tax calculation is done in the tax class..

There is also a tep_round function which you will find in general.php..

Comment #2

I try to explain in better way.

Friends I have a problem that already clears the dream to me and is the following one..

I have a computer article store www.sym.cl.

To fix my sale prices I use of base the dollar for my catalogue, I explain the entrance of products I do them in dollar since this facilitates at the time of changing the values to me of products according to the type of change, thus obvious I do not have to change 1 by one the products..

In summary the entrance I do it in dollars and the predetermined currency Pesos I fit the type of change where 618 Pesos = reason why 1 dollar is = to 618 this since the entrance is in dollars but the unfolding of the value in the iPage site must be in Pesos, now I detail to the problem the problem to them is that the calculations me do oscommerce of incorrect form if I request to him that it does not use decimal in the change currency:.

Example: I articulate x 50USD$ x 19% IVA = 59,5 xs 618(type of change) = $36,771 this would be the correct value..

But oscommerce makes following when eliminating of the unfolding of the prices the 2 decimal:.

I articulate x 50USD$ x 19% IVA = 60 xs 618(tipo of change) = $37,080 Which is absolutely incorrect.

Dice to that the iPage site clears in a previous step to the suitable one. oscommerce single shows the correct value to me if fixed two decimal for the unfolding of prices but this are not a solution since in my country this does not, produce confusion so that all the values are exact, I can either pass the whole catalogue to Pesos since if the dollar changes in 1 unit I must change all values 1 by 1 and the idea is single to change the type of change..

Then my question is: some exists form of which it can publish formulates it of I calculate so that I calculate deploys with decimal but final of the value without and that of of correct form the value. Sincerely it's aid would be very valuable and would serve as a contribution for all the stores that use the dollar as currency bases to fix prices but that they sell mainly in national currency if the currency does not have decimal. I am really sure that here it will find aid and thanks.

Really to explain this in english is dificult to me beacause I undertunding if I readit but in 50% if I typed for me lol.

Salu2 From Chile Marcelo..

Comment #3

I found this something to do with that?.

// Calculates Tax rounding the result.

 function tep_calculate_tax($price, $tax) {.

   global $currencies;.

   return tep_round($price * $tax / 100, $currencies->currencies[DEFAULT_CURRENCY]['decimal_places']);.

 }..

Comment #4

Why nobody helps I dont make my self cleare?..

Comment #5

Hi,.

As Mark stated, there is a function called 'tep-round()', and you have found where it is called..

/catalog/includes/functions/general.php - lines 284 to 303.

// Wrapper function for round().

 function tep_round($number, $precision) {.

   if (strpos($number, '.') && (strlen(substr($number, strpos($number, '.')+1)) > $precision)) {.

     $number = substr($number, 0, strpos($number, '.') + 1 + $precision + 1);.

     if (substr($number, -1) >= 5) {.

       if ($precision > 1) {.

         $number = substr($number, 0, -1) + ('0.'str_repeat(0, $precision-1)'1');.

       } elseif ($precision == 1) {.

         $number = substr($number, 0, -1) + 0.1;.

       } else {.

         $number = substr($number, 0, -1) + 1;.

       }.

     } else {.

       $number = substr($number, 0, -1);.

     }.

   }.

   return $number;.

 }.

Peter..

Comment #6

Hi,.

I'm no PHP guru, but following the code in tep_round() function, it appears to me that if there is.

No.

Decimal point, then the number simply gets returned, no rounding ??.

What do others say ??.

Peter..

Comment #7

Trying to understand the code, in a few minutes I try in my iPage site and tellyou..

Y speak like tarza in english muajajajaja..

Comment #8

Fisrt sory but my english is bad, but I try it to tell them whats going wrong.

In Chile my country we using pesos this peso don't use decimal.

Explain: everething cost an exact value 200, 205, 200 without decimal.

Thas is why I seting the oscommerce for not using decimal with my currency.

The problem is I enter the value of all my products in dollar the chanche of that is 618 and the tax for my country is 19%.

The oscommerce give me this.

Example:.

50x1,19=60x618=$37.080 But this is wrong.

The real value is:.

50x1,19=59,5x618=$36.771.

In less words the problem is in the formula, the formula round the values until I need to do.

The correct formula is.

50x618=$30.900x1.19=$36.771.

Where I can chanche this I look for everithing and everithing dosent work..

Salu2.

Marcelo.

This post has been edited by.

MadBox.

: 22 April 2004, 20:19..

Comment #9

If you would to tell me were is the formula calculation in what file, maybe I do something..

Comment #10


This question was taken from a support group/message board and re-posted here so others can learn from it.