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

EsSa55

  • Jr. Member
  • **
  • Posts: 70
    • 4FootyFans & 4MovieTVmusicFans
  • Skype Name: talk2-4footyfans
  • VirtueMart Version: Live: 3.4.2
Re: "No shop currency defined" error
« Reply #30 on: September 09, 2019, 11:54:19 am »
result of debug

EsSa55

  • Jr. Member
  • **
  • Posts: 70
    • 4FootyFans & 4MovieTVmusicFans
  • Skype Name: talk2-4footyfans
  • VirtueMart Version: Live: 3.4.2
Re: "No shop currency defined" error
« Reply #31 on: September 09, 2019, 19:44:08 pm »
So, I did a local install of the latest JM/VM combo and, no problem.

Not sure what that means, but a fresh installation for a Live site is hardly an option.

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3505
  • using Matomo instead of Google Analytics
Re: "No shop currency defined" error
« Reply #32 on: September 09, 2019, 19:47:10 pm »
Just a guess: It's not visible in your screenshots, but looking at your site it seems that you are using the third party 'PayPal Pro Plugin' which hasn't been updated since 30 April 2018. Do you get the same error if you use the original VirtueMart PayPal plugin?
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

EsSa55

  • Jr. Member
  • **
  • Posts: 70
    • 4FootyFans & 4MovieTVmusicFans
  • Skype Name: talk2-4footyfans
  • VirtueMart Version: Live: 3.4.2
Re: "No shop currency defined" error
« Reply #33 on: September 09, 2019, 20:01:06 pm »
Hello jjk

Thanks but the plugin version is as current as Today. So, wherever you have seen April 2018 is not correct.

Also, the issue does apply to Every payment plugin, 'indigenous' and 3rd party

TIA

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3505
  • using Matomo instead of Google Analytics
Re: "No shop currency defined" error
« Reply #34 on: September 09, 2019, 20:45:10 pm »
Thanks but the plugin version is as current as Today. So, wherever you have seen April 2018 is not correct.
I did see that here: https://plugins.online-store.co.uk/paypal_payments_pro/changelog.html

And btw - my Firefox Inspector shows a javascript error and a parsing error on your site. Probably not related to your currency problem, but maybe you should look into those, too.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

EsSa55

  • Jr. Member
  • **
  • Posts: 70
    • 4FootyFans & 4MovieTVmusicFans
  • Skype Name: talk2-4footyfans
  • VirtueMart Version: Live: 3.4.2
Re: "No shop currency defined" error
« Reply #35 on: September 09, 2019, 20:51:24 pm »
Yes, the changelog is rather out of date.

The current version is actually 1.3.25, dated within the last few days and for VM3.6

Thanks for the advice re the issue

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9918
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: "No shop currency defined" error
« Reply #36 on: September 10, 2019, 09:29:38 am »
What delivers this query?

Code: [Select]
$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 . '"';

you may execute it per phpmyadmin, of course replace the #__ with your prefix.
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: 70
    • 4FootyFans & 4MovieTVmusicFans
  • Skype Name: talk2-4footyfans
  • VirtueMart Version: Live: 3.4.2
Re: "No shop currency defined" error
« Reply #37 on: September 10, 2019, 10:08:46 am »
1 errors were found during analysis.

Ending quote ' was expected. (near "" at position 219)

Position 219?

Anyway, added ' at end:

SELECT * FROM `u84uz_virtuemart_currencies` AS c LEFT JOIN `u84uz_virtuemart_vendors` AS v ON c.virtuemart_currency_id = v.vendor_currency WHERE v.virtuemart_vendor_id = "' . (int)$_vendorId . '"';'

Result:

MySQL returned an empty result set (i.e. zero rows). (Query took 0.0008 seconds.)

Result is the same on any of my other databases where the same tables exist so was desired result achieved?

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9918
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: "No shop currency defined" error
« Reply #38 on: September 11, 2019, 12:45:55 pm »
Then you must look in your tables. The query is correct and works. You must of course also replace this part ' . (int)$_vendorId . ' against your vendorId, usually 1.
lets debug the vendorId.

Do not use this nonsense here
Code: [Select]
print 'Debug Line '.__LINE__.' $_vendorCurrencies <pre>'; print_r (self::$_vendorCurrencies[$_vendorId]); print "</pre><br />\n";

just use instead
Code: [Select]
vmdebug('my vendor id and currencies',$_vendorId, self::$_vendorCurrencies);

and enable the vmdebug. Maybe your vendorId is zero, or some unexpected number.[/code]
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9918
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: "No shop currency defined" error
« Reply #39 on: September 11, 2019, 12:49:23 pm »
or lets try that one

Code: [Select]
static function getVendorCurrency ($_vendorId) {
if(empty($_vendorId)){
vmTrace('getVendorCurrency vendor Id empty');
$_vendorId = 1;
}
......(rest of function)

So if an empty VendorId is the problem, we see where it is called and the vendorId is set to 1, so it should work (for singlevendor stores).
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: 70
    • 4FootyFans & 4MovieTVmusicFans
  • Skype Name: talk2-4footyfans
  • VirtueMart Version: Live: 3.4.2
Re: "No shop currency defined" error
« Reply #40 on: September 11, 2019, 14:49:00 pm »
Sorry, I'm lost now.

I had not changed your original code to include vendorid=1

Kindly let me now have the complete correct code, with vendorid =1

TIA

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9918
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: "No shop currency defined" error
« Reply #41 on: September 12, 2019, 13:29:33 pm »
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: 70
    • 4FootyFans & 4MovieTVmusicFans
  • Skype Name: talk2-4footyfans
  • VirtueMart Version: Live: 3.4.2
Re: "No shop currency defined" error
« Reply #42 on: September 15, 2019, 11:44:42 am »
Whether for this reason, or not, updating to:

http://dev.virtuemart.net/attachments/1181/com_virtuemart.3.6.1.10144_package_or_extract.zip

solved the issue for me, for all payment plugins.

Thanks

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9918
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: "No shop currency defined" error
« Reply #43 on: September 16, 2019, 15:05:22 pm »
Please tell us the result of the vmTrace. You must enable the debug for that, maybe just for admin.

It works now, because there is a fallback to vendorId=1.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

stAn99

  • Contributing Developer
  • Jr. Member
  • *
  • Posts: 84
    • One Page Checkout for Virtuemart 2
Re: "No shop currency defined" error
« Reply #44 on: September 18, 2019, 11:50:42 am »
hello, i get the same error:
COM_VIRTUEMART_CONF_WARN_NO_CURRENCY_DEFINED

i've traced mine down to:
Code: [Select]
if(empty($this->_cache->virtuemart_vendor_id)){
$this->_cache[$this->_id]->virtuemart_vendor_id = vmAccess::getVendorId('paymentmethod.edit');
}

which incorrectly returns FALSE instead of the single vendor which is being used.

so commenting this seems to fix the problem at
\administrator\components\com_virtuemart\models\paymentmethod.php


further debugging of vmaccess:
- when a 3rd party plugin loads VM at backend too early such as backtrace1 below
- virtuemart incorrect recognizes vmDefines::$_appId=='site' OR it's altered by 3rd party

i suggest to remake acl not to cache statically the state of the application, i.e. to replace all
Code: [Select]
if(self::$_site === null) {
 //all occurances
}

with non-cached version:
Code: [Select]
$app = JFactory::getApplication();
self::$_site = $app->isSite();

especially in manager function which triggers this.


backtrace:
administrator/components/com_virtuemart/helpers/config.php 85
administrator/components/com_virtuemart/helpers/config.php 468
administrator/components/com_awocoupon/helper/estore/virtuemart/class-awocoupon-helper-estore-virtuemart-currency.php 22
administrator/components/com_awocoupon/awocoupon/library/class-awocoupon-library-helper.php 441
administrator/components/com_awocoupon/helper/awocoupon.php 88
plugins/system/awocoupon/awocoupon.php 32


stan
----
RuposTel.com
www.rupostel.com
Your customized checkout solution for Virtuemart