|
How to add decimal to my price? 2 г., 2 мес. назад
|
Репутация: -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
Постов: 10
|
|
|
|
|
How to add decimal to my price? 2 г., 2 мес. назад
|
Репутация: 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
Постов: 584
|
|
|
|
|
Re: How to add decimal to my price? 2 г., 2 мес. назад
|
Репутация: 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
Постов: 4
|
|
|
|
|
Re:How to add decimal to my price? 2 г., 2 мес. назад
|
Репутация: -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
Постов: 10
|
|
Последнее редактирование: 02.03.2010 20:36 Редактировал Tadek.
|
|
|
Re:How to add decimal to my price? 2 г., 2 мес. назад
|
Репутация: 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
Постов: 584
|
|
|
|
|
Re:How to add decimal to my price? 2 г., 2 мес. назад
|
Репутация: -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
Постов: 10
|
|
|
|
|
Re:How to add decimal to my price? 2 г., 2 мес. назад
|
Репутация: 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
Постов: 584
|
|
Последнее редактирование: 02.03.2010 21:06 Редактировал Igort.
|
|
|
Re:How to add decimal to my price? 2 г., 2 мес. назад
|
Репутация: -1
|
|
Thank you verry much!!!
|
|
Tadek
Fresh Boarder
Постов: 10
|
|
|
|
|
Re:How to add decimal to my price? 2 г., 2 мес. назад
|
Репутация: 6
|
|
Let me know it will work?
|
|
Igort
Administrator
Постов: 584
|
|
|
|
|
Re:How to add decimal to my price? 2 г., 2 мес. назад
|
Репутация: -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
Постов: 10
|
|
|
|
|
Re:How to add decimal to my price? 2 г., 2 мес. назад
|
Репутация: 6
|
|
Oh, yes, It should be not sprintf('Valujs' but JText::sprintf('Valujs',
|
|
Igort
Administrator
Постов: 584
|
|
|
|
|
Re:How to add decimal to my price? 2 г., 2 мес. назад
|
Репутация: -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
Постов: 10
|
|
|
|
|
Re:How to add decimal to my price? 2 г., 2 мес. назад
|
Репутация: 6
|
|
Please, create a new thread for new question.
|
|
Igort
Administrator
Постов: 584
|
|
|
|
|
Re:How to add decimal to my price? 2 г., 2 мес. назад
|
Репутация: 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
Постов: 4
|
|
|
|
|
Re:How to add decimal to my price? 2 г., 2 мес. назад
|
Репутация: -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
Постов: 10
|
|
|
|
|