studio

site development

Welcome, Guest
Please Login or Register.    Lost Password?
Forum is locked
How to add decimal to my price? Forum is locked
(1 viewing) (1) Guest
Go to bottomPage: 12
TOPIC: How to add decimal to my price?
*
#404
How to add decimal to my price? 1 Year, 11 Months ago Karma: -1
Hello,

I have a question. I use iPrice and i love it. But i need to add prices with decimal numbers. Like $2,50 or $25,25. When i do this in iPrice the numbers go up. ($2.50 becomes $3). How can i change this?

Thx for the help.

Greetz,

Tadeusz
Tadek
Fresh Boarder
Posts: 10
graphgraph
User Offline Click here to see the profile of this user
The topic has been locked.
 
#406
How to add decimal to my price? 1 Year, 11 Months ago Karma: 6
Hello.
You can change the type of jos_iprice_item table field "cost" from INT to DECIMAL(15,2) with PHPMyAdmin utility to add decimals.
Igort
Administrator
Posts: 560
graph
User Offline Click here to see the profile of this user
The topic has been locked.
 
#411
Re: How to add decimal to my price? 1 Year, 11 Months ago Karma: 0
Hi i'm having the same problem, just testing with the light version and looks like if all goes well i will be ordering the full version with cart.

i have made the changes as above and the prices in mysql show the decimal points i.e 0.81 but iprice shows 0, i have also added one in at £1.03, again in mysql after the change above it shows £1.03 but iprice shows £1

any ideas on how to get this to work?

thanks in advance

Tsun
Tsun
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
The topic has been locked.
 
#416
Re:How to add decimal to my price? 1 Year, 11 Months ago Karma: -1
Ok i changed the mysql table with phpmyadmin. Now in joomla i can add decimals to my price. But on the web iprice shows only the euro's and no cents.


Tadek
Fresh Boarder
Posts: 10
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2010/03/02 20:36 By Tadek.
The topic has been locked.
 
#417
Re:How to add decimal to my price? 1 Year, 11 Months ago Karma: 6
Also You should change output format of amount in language file language/xx-XX/xx-XX.com_ipricecalc.ini
Also you should change JavaScropt output format of amount in file components/com_ipriceclacl/views/tmpl/default.php.
I plan to add decimals in the next version of IPrice calculator LIGHT.
Igort
Administrator
Posts: 560
graph
User Offline Click here to see the profile of this user
The topic has been locked.
 
#418
Re:How to add decimal to my price? 1 Year, 11 Months ago Karma: -1
Thx for your time, but can you help me just a little bit more. What is the code to change the output format in language/xx-XX/xx-XX.com_ipricecalc.ini and in components/com_ipriceclacl/views/tmpl/default.php. And on witch line, must i change it.

Greetz,
Tadek
Fresh Boarder
Posts: 10
graphgraph
User Offline Click here to see the profile of this user
The topic has been locked.
 
#419
Re:How to add decimal to my price? 1 Year, 11 Months ago Karma: 6
in file language/xx-XX/xx-XX.com_ipricecalc.ini you should change line 27

from VALU= $%d

to VALU=$%01.2f

and in file components/com_ipriceclacl/views/category/tmpl/default.php change line 183

from:
document.getElementById('results_'+i).innerHTML = <?php echo JText::sprintf('Valujs','sum_[i]')?>;

to:
document.getElementById('results_'+i).innerHTML = <?php echo JText::sprintf('Valujs','sum_[i].toFixed(2)')?>;

and line 185
from:
document.getElementById('results_bottom').innerHTML = <?php echo JText::sprintf('Valujs','SUM')?>;

to:
document.getElementById('results_bottom').innerHTML = <?php echo JText::sprintf('Valujs','SUM.toFixed(2)')?>;
Igort
Administrator
Posts: 560
graph
User Offline Click here to see the profile of this user
Last Edit: 2010/03/02 21:06 By Igort.
The topic has been locked.
 
#420
Re:How to add decimal to my price? 1 Year, 11 Months ago Karma: -1
Thank you verry much!!!
Tadek
Fresh Boarder
Posts: 10
graphgraph
User Offline Click here to see the profile of this user
The topic has been locked.
 
#421
Re:How to add decimal to my price? 1 Year, 11 Months ago Karma: 6
Let me know it will work?
Igort
Administrator
Posts: 560
graph
User Offline Click here to see the profile of this user
The topic has been locked.
 
#422
Re:How to add decimal to my price? 1 Year, 11 Months ago Karma: -1
I got the following problem. De subtotal and total won't show when i add a product. See the link website
Tadek
Fresh Boarder
Posts: 10
graphgraph
User Offline Click here to see the profile of this user
The topic has been locked.
 
#423
Re:How to add decimal to my price? 1 Year, 11 Months ago Karma: 6
Oh, yes, It should be not sprintf('Valujs' but JText::sprintf('Valujs',
Igort
Administrator
Posts: 560
graph
User Offline Click here to see the profile of this user
The topic has been locked.
 
#424
Re:How to add decimal to my price? 1 Year, 11 Months ago Karma: -1
It works thx! Another question can i change the look of the mail, that sends to the administrator? With the order.
Tadek
Fresh Boarder
Posts: 10
graphgraph
User Offline Click here to see the profile of this user
The topic has been locked.
 
#426
Re:How to add decimal to my price? 1 Year, 11 Months ago Karma: 6
Please, create a new thread for new question.
Igort
Administrator
Posts: 560
graph
User Offline Click here to see the profile of this user
The topic has been locked.
 
#428
Re:How to add decimal to my price? 1 Year, 11 Months ago Karma: 0
hi thanks for above the decimals working now, but i cannot get the sub totals as above and couldnt see what needed changing above, can you clarify please.
i have

document.getElementById('results_'+i).innerHTML = <?php echo JText::sprintf('Valujs','sum_[i].toFixed(2)')?>;

}
document.getElementById('results_bottom').innerHTML = <?php echo JText::sprintf('Valujs','SUM.toFixed(2)')?>;



i love the look of this component and the light version is just a trial for me as i need the extra features.
Tsun
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
The topic has been locked.
 
#429
Re:How to add decimal to my price? 1 Year, 11 Months ago Karma: -1
This is the good one, worked for me!

from:
document.getElementById('results_'+i).innerHTML = <?php echo JText::sprintf('Valujs','sum_[i]')?>;

to:
document.getElementById('results_'+i).innerHTML = <?php echo JText::sprintf('Valujs','sum_[i].toFixed(2)')?>;

and line 185
from:
document.getElementById('results_bottom').innerHTML = <?php echo JText::sprintf('Valujs','SUM')?>;

to:
document.getElementById('results_bottom').innerHTML = <?php echo JText::sprintf('Valujs','SUM.toFixed(2)')?>;
Tadek
Fresh Boarder
Posts: 10
graphgraph
User Offline Click here to see the profile of this user
The topic has been locked.
 
Go to topPage: 12
Moderators: Igort
get the latest posts directly to your desktop

Announcements

Специальное предложение!
Сайт-минимагазин "под ключ" за неделю. Система управления сайтом. Каталоги и прайс-листы товаров с формой заказа. Корзина заказа. Неограниченное количество позиций. Разделы и категории. Импорт из Excel.

Подробности...