Hello-
I have search through the code and cannot find where I can move the $ sign on USD currency to the left side of the price. (Example: $12.95 and not 12.95 $)
Thanks in advance,
Ashley
Hello-
I have search through the code and cannot find where I can move the $ sign on USD currency to the left side of the price. (Example: $12.95 and not 12.95 $)
Thanks in advance,
Ashley
You should search for
[{ $currency->sign}]
in the template files.
This is usually preceded by something like this
[{ $product->getFTPrice()}]
If you now put
[{ $currency->sign}]
before
[{ $product->getFTPrice()}]
it should work out for you.
The main template files with prices are product.tpl and details.tpl.
Hi Ashley,
on the topic of currencies, you might also want to check out this article on multiple currencies for OXID.
Best
Ashant
This worked great. Thank you!
Using advise here as well as from the thread link below, I found that this solution was not complete.
http://www.oxid-esales.com/forum/showthread.php?t=1069
The code incorporates a price prefix into price getter functions. So if you simply move the $ sign in the template (tpl) files, you end up with situations like “Price starting $from 1.99” where in this case the code has prefixed the word ‘from’. You wouldn’t notice this in cases where no prefix is used, but it obviously makes no sense when a prefix is used.
IMO, the currency sign (as well as location left/right) should be incorporated into the formatting of the price. This is pretty standard in software (MS Excel) and, anyways, when does a price ever appear w/o the currency sign? OScommerce and it’s many derivatives also function like this.
If others are in favour, I’d be happy to submit a change request.
In the meantime, I extended the oxlang class and modified the formatCurrency function to include the currency sign. I then removed all occurrences of $currency->sign from the templates. So far, appears to work w/o further modification.
Hi,
recently, there was a solution at the dev-general mailing list: only one place in the view had to be changed. Will you find it by yourself (as I am on the road presently)?
Regards
I think I found what Marco is referring to under the mailing list subject “decimal separator not only dependant on currency”. However, the discussion only makes some suggestions to extend oxlang. This is what I’ve already done, but in my case it’s for a different formatting reason.
[QUOTE=spurvis;45376]I think I found what Marco is referring to under the mailing list subject “decimal separator not only dependant on currency”. However, the discussion only makes some suggestions to extend oxlang. This is what I’ve already done, but in my case it’s for a different formatting reason.[/QUOTE]
Aye, sorry - you are right. It was about the decimal seperator instead of the currency sign position…
Regards
Hello,
I would also like to move the currency symbol to the left side of the price but was not yet successful. I tried the above mentionend method and also tried to move [{$currency->sign}] in front of <span>[{$priceItem->fbrutprice}]</span> in the priceinfo.tpl. I also deleted all the files in the tmp folder. I am currently using oxid 4.6.2_46646 CE and the azure theme as a parent theme.
Any help/idea would be really appreciated.
Hello masip,
means, you changed something and don’t see the change although you cleared the tmp folder? Sure you’re working in the right directory?
Regards
Hello Marco,
thank you for your quick response.
Exactly, I did the adjustment but don’t see it in the store itself.
I did the adjustment in \out\masip pl\page\details\inc\priceinfo.tpl
and checked in the shop at the product itself. I am aware that the adjustments might have to be done in other folders as well, to see the currency symbol e.g. in the category overview on the desired position.
I have the feeling, that the above mentioned post
[I]
You should search for
PHP-Code:
[{ $currency->sign}]
in the template files.
This is usually preceded by something like this
PHP-Code:
[{ $product->getFTPrice()}]
If you now put
PHP-Code:
[{ $currency->sign}]
before
PHP-Code:
[{ $product->getFTPrice()}]
it should work out for you.
The main template files with prices are product.tpl and details.tpl. [/I]
referes to the basic theme.
I also removed all other currencies in the backend and use only one at the moment I also removed the currency symbol in the frontend at the top (next to register, login…).
Regards
Masip
Hello Masip,
alright, clear.
During the development, it is probably very useful to show in which template you’re working presently, right. There is a config.inc.php in your shop. Switch the debug level to “8” instead of “0” and see what happens.
Also, please don’t forget to clean the /tmp/ folder after each change in templates
Regards
Ok, switching the debug level helped a lot. Was in the wrong tpl file, it is productmain.tpl.
Thank you for your support!
Thanks for your feedback. Am curious how it works in your country