Newbie to ASP.net and think that Nopcommerce is cool - had the CMS up and runing in a day (version 1.8) fantastic features... But got stuck on this point... Have a product displayed at.... £19.00 (GBP)
I want to remove the (GBP) so only £19.00 is displayed... But where and how can i change it! (or put it in a <span> class...)
local display page now becomes: £19.00 (GBR) exclusive offer change the currency - $ : $30.14 (USD) exclusive offer
know its on the module page - but unsure of which values to change or comment out code... ProductPrice.ascx - ProductPrice.ascx.cs - ProductPrice.ascx.designer.cs
UK - Edit Currency details: Custom formatting £#,###.00 (exclusive) - add this to the GBR and shows up as
£19.99 (exclusive) (GBR) change the currency.... $19.99 (USD)
Okay not the result i wanted, but getting warmer, must be something with the currency code / product id displaying....its like finding a needle in a haystack, but without a magnet...
1. Just disable or delete all other currencies from admin area and GBP will disappear (ensure that only one currency is enabled) or 2. Delete the following code in LocalizationManager.GetCurrencyString(decimal amount, bool showCurrency, Currency targetCurrency) method:
if (showCurrency && CurrencyManager.GetAllCurrencies().Count > 1) result = String.Format("{0} ({1})", result, targetCurrency.CurrencyCode);
Old Price: $25.00 inc tax Your Price: $20.00 inc tax
For v1.8... Using the DEMO build files..
Store/Templates/Products/ OneVariant.ascx Go to Line 103 add a SPAN at start of line... <span style="color:red;">TEST</span>
Store/Modules/ProductPrice1.ascx Go to Line 10 add a SPAN at start of line... <span style="color:red;">WORD</span>
Store/Modules/ProductPrice2.ascx Go to Line 3 and 5 add a SPAN's at start of line... <span style="color:red;">123</span>
Remember to save the files and in the local or (upload) Remote - refresh your browsers and the added words will be there - go back to SPAN's and adjust your html coding...for different effects etc...
You will find the examples in - Book Category and product /61-cooking-for-two.aspx
May not be good practice to run string manipulation on every price that is shown but given that every currency code is 3 characters in length you can just trim the Price string length down by 5 characters to remove the (USD) at the end of the price.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.