VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: Dreakman on February 27, 2022, 13:01:45 PM

Title: How to remove currency symbol from currency selector module.
Post by: Dreakman on February 27, 2022, 13:01:45 PM
Hello,
I am using J 3.10.6 & VM 3.8.8, does anyone have an idea how to get rid of the currency symbol in the currency selector module?

Thanks in advance!
Title: Re: How to remove currency symbol from currency selector module.
Post by: GJC Web Design on February 27, 2022, 18:23:32 PM
It's CONCAT in the model query

administrator\components\com_virtuemart\models\currency.php ->  function getVendorAcceptedCurrrenciesList($vendorId = 0)

$q = 'SELECT `virtuemart_currency_id`,CONCAT_WS(" ",`currency_name`,`currency_symbol`) as currency_txt
               FROM `#__virtuemart_currencies` WHERE `virtuemart_currency_id` IN ('.$vendor_currency['vendor_accepted_currencies'].')';

so either use your own query in the module, core change the query, or use php to remove the last char from the resulting string in a loop  or as it's simply display use JS to remove the last char ( might work on a select with Jquery)

Title: Re: How to remove currency symbol from currency selector module.
Post by: Dreakman on February 28, 2022, 12:04:05 PM
Hello,
thank you for your help!