Mosets Community

Mosets Community (http://forum.mosets.com/index.php)
-   Discussions, Troubleshooting and Problems (http://forum.mosets.com/forumdisplay.php?f=32)
-   -   Currency symbol shows before and after price? (http://forum.mosets.com/showthread.php?t=17234)

SteveB 01-11-2011 06:43 AM

Currency symbol shows before and after price?
 
Hi all,

I've got a bit of a puzzle. My currency symbol is showing before and after the price

for example 265,000

I checked 'View Source:

<dd class="value price"><span class="currency"></span> 265,000<span class="suffix"> </span></dd>

This is happening with every property?

Anyone else come accross this?

Where can I start looking to resolve this?

Thanks for your help in advance

Kind regards

Steve

gray 01-12-2011 02:40 PM

In general, the price field is rendered by:
PHP Code:

case 'price':
    
$html .= ($fieldPrefix '<span class="prefix">' $fieldPrefix '</span>' '') . '<span class="currency">' $hotproperty->getCfg('currency') . '</span> ' number_format($fieldValue$hotproperty->getCfg('dec_point'), $hotproperty->getCfg('dec_string'), ($hotproperty->getCfg('thousand_sep')) ? $hotproperty->getCfg('thousand_string') : '') . ($fieldSuffix '<span class="suffix">' $fieldSuffix '</span>' '');
    break; 

in administrator/com_hotproperty/helpers/html/content.php

As you can see, there is a $fieldPrefix before the price and $fieldSuffix - after. So, check in price configs for the prefix and suffix values.

SteveB 01-14-2011 05:58 AM

Thanks Gray,

Where do I configure the suffix? In HP, when I go into the settings, there doesn't seem to be anywhere to configure the suffix. I can set the currency but I still get the Euro symbol after the price?

Am I missing something?

Thanks for your help with this.

Regards

Steve

gray 01-14-2011 05:48 PM

The Price field in extra fields management page does not have suffix/prefix settings.
Still, if to look at your HTML rendering (<span class="suffix"> €</span>), it seems that it does.
So, check the _hp_prop_ef table.

SteveB 01-14-2011 07:00 PM

Solved
 
Thanks Gray,

You were absolutely right. The older version of HP (0.98) allowed you to set whether the currentcy symbol displayed after the price or before. I migrated (like many others) by copying the database tables over. So whereby, the new version of HP doesn't give you that option, clearly the code is still rendering the settings in the database 9set from the old system).

You are absolutely correct -the table is jos_hp_prop_ef field = 'price' and there is a column called 'append_text' where the offending symbol had been set.

I just deleted the symbol - and that's fixed it. I guess that means that if anyone wants the currency symbol after the price, they'll need to manually input it in the database, as there is no where in the new HP version to set it.

Thanks again for your help with this - much appreciated.

Steve


All times are GMT +8. The time now is 02:10 AM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.