VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product pricing => Topic started by: Dvdb on October 30, 2018, 22:21:55 PM

Title: Determining the display currency
Post by: Dvdb on October 30, 2018, 22:21:55 PM
Hi all,

I am using joomla 3.8.12 and virtuemart 3.2.14

My show is multicurrency (aus, us, Euro)
I need to create a free shipping banner, but would like to display the value and currency in line with the currency

E.g. free shipping
Aus orders above 150
Us orders above 110
Euros orders above 100

To do this I need to find what the display currency is. Can anybody help how to find this?

P.s. I experimented with the  vmconfig option, but the display currency does not seem to be part of it

Appreciate your response

Dirk
Title: Re: Determining the display currency
Post by: GJC Web Design on October 30, 2018, 23:19:18 PM
does this get it ( from the curr module)

$mainframe = JFactory::getApplication();
$currencyModel = VmModel::getModel('currency');
$currencies = $currencyModel->getVendorAcceptedCurrrenciesList($vendorId);
$currencyDisplay = CurrencyDisplay::getInstance();
$virtuemart_currency_id = $mainframe->getUserStateFromRequest( "virtuemart_currency_id", 'virtuemart_currency_id',vRequest::getInt('virtuemart_currency_id',$currencyDisplay->_vendorCurrency) );
Title: Re: Determining the display currency
Post by: Dvdb on October 31, 2018, 10:55:32 AM
Thank you GFC web design, with a bit of tweaking you set me on the right path.

After spending the good part of two evenings researching it, you solved it very quickly.

Much appreciated

DVDB