Price Format

Questions and answers about change of functions, design, hosting etc.

Moderators: Koduc, Xpycm

Forum rules
Pay attention! Forum is not a means for guaranteed support of clients and users. An answer as well as a quick answer is not supposed on the forum. We post messages as soon as possible.

The message limit on the forum is 3 messages per day.
If you want to say "thank you" then use the function "Give good reputation point", which is a green icon "plus" under the nickname of the person, who answered the message.

Price Format

Postby rogbsa » 02 Jul 2013, 23:08

Where and how can I change the price format from #######.00 £ to £ #######.00, meaning putting the currency in front rather than at back of price.
rogbsa
Stranger
 
Posts: 2
Joined: 02 Jul 2013, 23:06
Reputation point: 0

Re: Price Format

Postby fisher » 03 Jul 2013, 10:19

In the protected/modules/apartments/models/Apartment.php file you can find the 'getPrettyPrice' function. Here you can set the currency's symbol before the price and change the currency's symbol.

$this->setPretty($price) — it is the price;
$this->getCurrency() - it is the currency's symbol.
fisher
Citizen
Citizen
 
Posts: 63
Joined: 15 Apr 2013, 09:30
Reputation point: 1

Re: Price Format

Postby qaona » 04 Jul 2013, 03:53

Hello!
I have the same problem, I was unable to resolve by editing the code.
Please guide me where I made mistake?
Edited image file as the link: Image Image
thank you
qaona
Stranger
 
Posts: 24
Joined: 06 Jun 2013, 05:10
Reputation point: 0

Re: Price Format

Postby fisher » 04 Jul 2013, 11:47

the code should be the following:
Code: Select all
return $this->getCurrency().' '.$this->setPretty($price).' '.self::getPriceName($this->price_type); 
fisher
Citizen
Citizen
 
Posts: 63
Joined: 15 Apr 2013, 09:30
Reputation point: 1

Re: Price Format

Postby qaona » 05 Jul 2013, 02:59

Solved!
Many thanks for the help
qaona
Stranger
 
Posts: 24
Joined: 06 Jun 2013, 05:10
Reputation point: 0

Re: Price Format

Postby rogbsa » 10 Jul 2013, 00:48

Thanks loads. Works
rogbsa
Stranger
 
Posts: 2
Joined: 02 Jul 2013, 23:06
Reputation point: 0


Return to Questions and help for changes

Who is online

Users browsing this forum: No registered users and 56 guests