Page 1 of 1

Trouble in calculating the total cost

Posted: Wed Feb 17, 2010 5:38 am
by vijaya6jun
Hi,
Vijayalakshmi here
Have a problem

In currency options
on converting to India currency
example
1USD=Rs45.96/-

calculating the cost using options

the regular price is 45.96 rupees, with a option depending on size the cost is 4,044.48 rupees(just an example)
the calculation in Alegrocart is "Price with Options = Rs.49.96 /-"
but it should be Rs4,090.44/-

the cost is correct in the cart, but has some prob in display of Price with Options = Rs."........." /-
Could you please check and help me to rectify it,.................

regards,
Vijayalakshmi

Re: Trouble in calculating the total cost

Posted: Wed Feb 17, 2010 8:52 am
by Brent
I will have a look.
The price calculation you see in the price with options is all done by Javascript.
I didn't do the rupees.
(ps) what version do you have installed.

Can you post your currency set-up so I can recreate it.

edit: The problem is the comma in the option price. I'll add the code to strip commas and post tomorrow.

Re: Trouble in calculating the total cost

Posted: Wed Feb 17, 2010 10:00 am
by vijaya6jun
Hi,
Thanks for your reply.......

You have provided three options for currency
->Canadian dollar
->USD
->British Pound

I added another option with the code for India(INR) and a default value of 1.0000 which was updated automatically to the currency value of 45.00

I am using Alegrocart 1.1

Things are working fine, the prob is only when it displays the price with options......

its calculating in this way
A+B=C
Rs45.26+Rs3,100=48.26

Its taking only the first digit of B.

Re: Trouble in calculating the total cost V1.1

Posted: Thu Feb 18, 2010 4:04 am
by Brent
Attachment includes modification to product options for select or radio. Fix for Version 1.1

Upload these 2 files

Re: Trouble in calculating the total cost

Posted: Thu Feb 18, 2010 10:46 am
by vijaya6jun
The bug is fixed
Really it was a fast reply.....
Happy about it
Thank you so much