How change price format in v3.5

Dudus

Avatar: Dudus

2012-11-15 14:06

Hi!

I have problem in v3.5.

I want to take away ".00" and put in ",-" instead.

I changed:

1. core/common.js, changePriceFormat() :
var sDecimalSeparator = ',';
next change:
sPrice = sPriceFull+''+sDecimalSeparator+''+aPrice[1];
to:
if ( aPrice[1] == 0 )
sPrice = sPriceFull+",-";
else
sPrice = sPriceFull+''+sDecimalSeparator+''+aPrice[1];


2. core/common.php:
function displayPrice( $fPrice){
if ( intval($fPrice) == $fPrice ) return number_format( $fPrice,0,'', '' ).',-';
else return number_format( $fPrice, 2, ',', '' );
} // end function displayPrice


3. templates/orders_form.tpl:
<fieldset id="deliveryAndPayment">
<legend>$lang[Delivery_and_payment] (prices are in $config[currency_symbol])</legend>
$sPaymentCarriers
</fieldset>

<td id="carrierCost">
0,-
</td>

All working, but if my product have attributes, then the price change to: 0,-


Please help, thanks: Dudus

» Quick.Cart v3.x

interkob

Avatar: interkob

2012-11-16 10:42

In this forum you are not supposed to ask about EXT version. Here are the place to talk about freeware only. Ask via email.

interkob@gmail.com

Back to top
about us | contact