News:

Support the VirtueMart project and become a member

Main Menu

"No shop currency defined" error

Started by dmb, January 12, 2019, 13:03:56 PM

Previous topic - Next topic

Twototango

Same problem here...

Updated to  J 3.9.11 and VM 3.6.0 10113

It's definitely not payment specific, I have 6 payment methods active, al have the same error message.
In the database all seems to correct. Also updated the tables with the inbuild tool.

VM 3.6 glitch I presume... going back to 3.4 as I'm experiencing other minor glitshes.
Like the first payment methode being preselected (very annoying in this shop) but that's for another tread  ;)

I think I'll just wait for 3.6.1  8)


EsSa55

Updated from 3.4.2 to 3.6 (via Manage->Update AND also Installed the 3 zips on a different backup site).

I have the same issue for all installed (enabled or disabled) payment plugins.

It means there are no available payment options on the checkout page.

The above 2 installs were on backup sites, with my live site remaining on 3.4.2.

TIA

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

EsSa55

Yes, thanks.

I have been following the other thread.

Milbo> Maybe this bugfix version helps you http://forum.virtuemart.net/index.php?topic=143386.0

That is a link to the other thread not to the bugfix version.

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Milbo

ahh wrong copypaste, thank you jenkinhill.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

EsSa55

Having updated to latest version, the error message persists.

See screenshots

TIA

jjk

I would try to select from the Joomla menu 'System' > 'Clear Cache' and click the 'Delete All' button and also clear your jchoptimize cache.
Then go to your shop settings: https://docs.virtuemart.net/faqs/92-how-to-change-the-shop-default-currency.html
Next go to your Shop [Edit] view > Vendor tab, make sure your 'Currency' field shows the British pound and save the setting again.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

EsSa55

Thanks jjk

However, clearing the system cache includes the jchoptimize cache and was already done.

British Pound is already the store default currency

TIA

jjk

My idea was to 'Save' the shop currency in the shop configuration again. Check your database table xxxxx_virtuemart_vendors, if the British pound (currency id 52) is set as the vendor_currenccy.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

GJC Web Design

the string is COM_VIRTUEMART_CONF_WARN_NO_CURRENCY_DEFINED

this is in 3 different files .. can u do a bit of investigation to find which file / function throws the error

the 3 files are

administrator\components\com_virtuemart\models\vendor.php line 316
administrator\components\com_virtuemart\models\currency.php line 107
administrator\components\com_virtuemart\helpers\currencydisplay.php line 113

just change the   vmWarn(vmText::sprintf('COM_VIRTUEMART_CONF_WARN_NO_CURRENCY_DEFINED','<a href="'.$link.'">'.$link.'</a>')); to

vmWarn(vmText::sprintf('COM_VIRTUEMART_CONF_WARN_NO_CURRENCY_DEFINEDXX','<a href="'.$link.'">'.$link.'</a>'));
so u can identify the function that is reporting this
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 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

EsSa55

Hello John

Re: "administrator\components\com_virtuemart\models\vendor.php line 316"

The line reads:

vmWarn('COM_VIRTUEMART_CONF_WARN_NO_CURRENCY_DEFINED','<a href="'.$link.'">'.$link.'</a>');

NOT

vmWarn(vmText::sprintf('COM_VIRTUEMART_CONF_WARN_NO_CURRENCY_DEFINED','<a href="'.$link.'">'.$link.'</a>'));


The other 2 files are as you suggested.

TIA

Ed

EsSa55

I can also confirm that the vendor default currency is set correctly.......

EsSa55


GJC Web Design

try adding some debug to see if the vendor curr is being found

e.g. line 304

   static function getVendorCurrency ($_vendorId) {
print 'Debug Line '.__LINE__.' $_vendorCurrencies <pre>'; print_r (self::$_vendorCurrencies[$_vendorId]); print "</pre><br />\n";
      if(!isset(self::$_vendorCurrencies[$_vendorId])){
         $db = JFactory::getDBO ();
         if(VmConfig::get('anyInShopCurrency',true)){
            $q = 'SELECT *  FROM `#__virtuemart_currencies` AS c
         LEFT JOIN `#__virtuemart_vendors` AS v ON  c.virtuemart_currency_id = v.vendor_currency
         WHERE v.virtuemart_vendor_id = "' . (int)$_vendorId . '"';
            $db->setQuery ($q);
            self::$_vendorCurrencies[$_vendorId] = $db->loadObject ();
print 'Debug Line '.__LINE__.' $_vendorCurrencies <pre>'; print_r (self::$_vendorCurrencies[$_vendorId]); print "</pre><br />\n";
            if(!self::$_vendorCurrencies[$_vendorId]){
               $link = JURI::root(false).'administrator/index.php?option=com_virtuemart&view=user&task=editshop';
               vmWarn('COM_VIRTUEMART_CONF_WARN_NO_CURRENCY_DEFINEDXX','<a href="'.$link.'">'.$link.'</a>');
            }
         } else {
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 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