Author Topic: How to remove currency symbol from currency selector module.  (Read 1090 times)

Dreakman

  • Beginner
  • *
  • Posts: 19
    • Electro Dance Net
How to remove currency symbol from currency selector module.
« 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!
El Dance

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10638
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.8.8
Re: How to remove currency symbol from currency selector module.
« Reply #1 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)

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Dreakman

  • Beginner
  • *
  • Posts: 19
    • Electro Dance Net
Re: How to remove currency symbol from currency selector module.
« Reply #2 on: February 28, 2022, 12:04:05 pm »
Hello,
thank you for your help!
El Dance