Author Topic: "No shop currency defined" error  (Read 19283 times)

Twototango

  • Beginner
  • *
  • Posts: 13
  • A beginner
Re: "No shop currency defined" error
« Reply #15 on: August 30, 2019, 16:20:39 pm »
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

  • Jr. Member
  • **
  • Posts: 93
    • 4FootyFans & 4MovieTVmusicFans
  • Skype Name: talk2-4footyfans
  • VirtueMart Version: Live: 3.4.2
Re: "No shop currency defined" error
« Reply #16 on: September 01, 2019, 22:35:32 pm »
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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10111
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: "No shop currency defined" error
« Reply #17 on: September 06, 2019, 15:26:49 pm »
Maybe this bugfix version helps you http://forum.virtuemart.net/index.php?topic=143386.0

When this does not help, then read this thread http://forum.virtuemart.net/index.php?topic=143386.0
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

EsSa55

  • Jr. Member
  • **
  • Posts: 93
    • 4FootyFans & 4MovieTVmusicFans
  • Skype Name: talk2-4footyfans
  • VirtueMart Version: Live: 3.4.2
Re: "No shop currency defined" error
« Reply #18 on: September 06, 2019, 15:35:52 pm »
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

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 28181
  • Always on vacation
    • Jenkin Hill Internet
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

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

Currently using VirtueMart 3.8.9.10473 on Joomla 3.9.28 PHP 7.4.14

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10111
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: "No shop currency defined" error
« Reply #20 on: September 06, 2019, 20:02:19 pm »
ahh wrong copypaste, thank you jenkinhill.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

EsSa55

  • Jr. Member
  • **
  • Posts: 93
    • 4FootyFans & 4MovieTVmusicFans
  • Skype Name: talk2-4footyfans
  • VirtueMart Version: Live: 3.4.2
Re: "No shop currency defined" error
« Reply #21 on: September 08, 2019, 18:47:24 pm »
Having updated to latest version, the error message persists.

See screenshots

TIA

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3729
  • using Matomo instead of Google Analytics
Re: "No shop currency defined" error
« Reply #22 on: September 08, 2019, 21:26:30 pm »
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

  • Jr. Member
  • **
  • Posts: 93
    • 4FootyFans & 4MovieTVmusicFans
  • Skype Name: talk2-4footyfans
  • VirtueMart Version: Live: 3.4.2
Re: "No shop currency defined" error
« Reply #23 on: September 08, 2019, 22:48:03 pm »
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

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3729
  • using Matomo instead of Google Analytics
Re: "No shop currency defined" error
« Reply #24 on: September 09, 2019, 07:38:32 am »
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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10218
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: "No shop currency defined" error
« Reply #25 on: September 09, 2019, 10:06:42 am »
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 http://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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

EsSa55

  • Jr. Member
  • **
  • Posts: 93
    • 4FootyFans & 4MovieTVmusicFans
  • Skype Name: talk2-4footyfans
  • VirtueMart Version: Live: 3.4.2
Re: "No shop currency defined" error
« Reply #26 on: September 09, 2019, 10:55:08 am »
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

  • Jr. Member
  • **
  • Posts: 93
    • 4FootyFans & 4MovieTVmusicFans
  • Skype Name: talk2-4footyfans
  • VirtueMart Version: Live: 3.4.2
Re: "No shop currency defined" error
« Reply #27 on: September 09, 2019, 10:56:54 am »
I can also confirm that the vendor default currency is set correctly.......

EsSa55

  • Jr. Member
  • **
  • Posts: 93
    • 4FootyFans & 4MovieTVmusicFans
  • Skype Name: talk2-4footyfans
  • VirtueMart Version: Live: 3.4.2
Re: "No shop currency defined" error
« Reply #28 on: September 09, 2019, 11:14:38 am »
see screenshot

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10218
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: "No shop currency defined" error
« Reply #29 on: September 09, 2019, 11:27:37 am »
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 http://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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation