VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: blackrat999 on June 20, 2019, 12:16:54 PM

Title: No Shop Currency defined!
Post by: blackrat999 on June 20, 2019, 12:16:54 PM
After a test live paypal purchase which all works fine i return to the merchant and get :

Warning
No Shop Currency defined! Go to https://www.malbersfabrics.co.uk/xxxxxxxxx/index.php?option=com_virtuemart&view=user&task=editshop

as you can see from the screenshot the currency is defined, it was on GB and Euro, i have changed that to just GB and ensured all required fields are complete on all tabs but another test afterwards does the same thing. otherwise it all completes)

why am i getting this error please?

Joomla 3.9.8
VM 3.4.2
Title: Re: No Shop Currency defined!
Post by: blackrat999 on June 28, 2019, 10:15:48 AM
Anyone please?
Title: Re: No Shop Currency defined!
Post by: Jörgen on June 28, 2019, 10:43:55 AM
Have You made sure that Your safe path is an absolute URL ?

Jörgen @ Kreativ Fotografi
Title: Re: No Shop Currency defined!
Post by: blackrat999 on June 28, 2019, 11:09:58 AM
Thanks for helping out.
My safe path is /home/xxxx/public_html/vxxxx/

I have this the same on about 10 other VM shops and they all work fine, not had this error before.

having checked instructions at https://docs.virtuemart.net/faqs/110-how-to-set-the-safe-path.html i have adjusted this so that it is now inside my administrator folder but otherwise i seem to have complied with instructions
Title: Re: No Shop Currency defined!
Post by: Jörgen on June 28, 2019, 11:36:32 AM
I do not know for certain, but this is directly taken from the tooltip for the safepath:

QuotePath for downloadable goods for sale and your invoices. This path is meant from your file root, not Joomla root. Attention - you must enter an absolute path here and it should (not must) be outside of your domain directory (i.e. httpdocs)

Jörgen @ Kreativ Fotografi
Title: Re: No Shop Currency defined!
Post by: blackrat999 on June 28, 2019, 11:47:18 AM
having checked the instructions for safepath im pretty sure this is correct now

/home/username/public_html/administrator/randomname/

done another test and still get this when you click "return to merchant" after Paypal payment has gone through

Warning

No Shop Currency defined! Go to https://www.malbersfabrics.xx.xx/administrator/index.php?option=com_virtuemart&view=user&task=editshop
Title: Re: No Shop Currency defined!
Post by: Jörgen on June 28, 2019, 11:51:40 AM
Taken from Microsoft documentation:
QuoteAn absolute URL uses the following format: scheme://server/path/resource

A relative URL typically consists only of the path, and optionally, the resource, but no scheme or server.

Jörgen @ Kreativ Fotografi
Title: Re: No Shop Currency defined!
Post by: blackrat999 on June 28, 2019, 12:10:58 PM
I had looked at the same page and have to confess to not really understanding it. I relied on the VM instructions of:

For safety reasons it is very important to create a folder in a path not accessible by an URL or with an unguessable name, create also a folder 'invoices' and 'keys' in it to store your sensitive data secure. Our suggested path is for your system /home/username/vmfiles

I tried this one to start with and it saved saying it was right (the currency error still occurred) and i then made it a bit better by setting it inside the administrator folder, it still said it was right (and the currency error was still present)

so /home/username/public_html/administrator/randomname/ seems to be acceptable to virtuemart and checking my other installations is all the same throughout and on none others do i get the currency error - so a bit stuck :-(
Title: Re: No Shop Currency defined!
Post by: jenkinhill on June 28, 2019, 12:27:24 PM
Safe path /home/username/public_html/administrator/randomname/  looks correct to me as long as administrator/randomname/  exists

Shot in the dark. Is Payment Currency in PayPal config set to GBP?
Title: Re: No Shop Currency defined!
Post by: blackrat999 on June 28, 2019, 12:32:00 PM
Thanks to you too - yes the folders exist and VM agrees it is correct.
Paypal shipping is indeed set to GBP
Title: Re: No Shop Currency defined!
Post by: blackrat999 on June 28, 2019, 12:37:36 PM
Also just removed the Paypal payment option and set another one - same error message :-(
Title: Re: No Shop Currency defined!
Post by: blackrat999 on June 29, 2019, 11:23:31 AM
Thanks for suggestions so far - still getting the error message after sales go through, hopefully someone might have an idea what is causing this.
Title: Re: No Shop Currency defined!
Post by: Jörgen on June 29, 2019, 13:19:25 PM
Just a hunch, create a new paypal payment itm with everything correctly added and inactivate the old item. If the new one works, delete the old one.

Jörgen @ Kreativ Fotografi
Title: Re: No Shop Currency defined!
Post by: blackrat999 on June 29, 2019, 16:00:30 PM
I tried that yesterday, not difference, keep firing hunches please!!
Title: Re: No Shop Currency defined!
Post by: jjk on June 29, 2019, 21:39:54 PM
Did you set the shop owner as a vendor in the 'Shop Edit' view?
Title: Re: No Shop Currency defined!
Post by: blackrat999 on July 01, 2019, 12:13:54 PM
Thanks.

Yes the shop owner is the ONLY one set as a Vendor.

I do have:

Warning
You are using single vendor mode, but it seems more than one user is set as vendor


However i have this on a few sites where there is 100% only one user set as "vendor" and i dont have the issue described here so assumed this was a bug of some sort, also seen plenty of other reports of this one without any other issues.
Title: Re: No Shop Currency defined!
Post by: Jörgen on July 01, 2019, 12:41:26 PM
Check in phpadmin to really make sure that only ONE user is marked as vendor.

Jörgen @ Kreativ Fotografi
Title: Re: No Shop Currency defined!
Post by: blackrat999 on July 01, 2019, 12:46:42 PM
XXXX_virtuemart_vendors only has one user in it (the right one) is there another table i should look in also?
Title: Re: No Shop Currency defined!
Post by: jenkinhill on July 01, 2019, 12:48:40 PM
Check database table  ###_virtuemart_vmusers  to see which users have an entry for "user_is_vendor"  Remove the 1 from VMusers who are not vendors.
Title: Re: No Shop Currency defined!
Post by: blackrat999 on July 01, 2019, 12:59:58 PM
Thanks there was another user in there with set as a vendor, have removed that one (which makes the vm admin error go away) and done another test purchase. Unfortunately still getting

Warning

No Shop Currency defined! Go to https://www.malbersfabrics.xx.xx/administrator/index.php?option=com_virtuemart&view=user&task=editshop

when i return to merchant after paypal completes.
Title: Re: No Shop Currency defined!
Post by: blackrat999 on July 01, 2019, 13:05:37 PM
Also tried selecting "select all" to say that all currencies were accepted in the store instead of just GBP, again still get that error message after successful payment is made.
Title: Re: No Shop Currency defined!
Post by: blackrat999 on July 02, 2019, 10:43:17 AM
Would it be possible to redirect the shopper to a different URL when they come back from Paypal at all? This perhaps would stop the error showing up?
Maybe there is a plugin somewhere that can do this as i assume the url to "return to merchant" is unique to the purchase?

Title: Re: No Shop Currency defined!
Post by: Jörgen on July 02, 2019, 12:47:33 PM
I use PayPal since almost 10 year and have not had any of these kind of problems. It has been a very steady experience with very few surprises.

Do You have HTTPS for the whole website ? Do You have conflicting settings in htaccess for HTTPS ?

Jörgen @ Kreativ Fotografi
Title: Re: No Shop Currency defined!
Post by: jjk on July 02, 2019, 14:36:26 PM
I'm running out of ideas. Here is my last ones: Did you check the values for the GBP currency display in the 'Currency Edit' view? And is the 'Email Currency' in the VM PayPal configuration set to 'Vendor'? Also, did you try a payment already with 'Debug' and 'Log debug in file' in the VM PayPal configuration?
Title: Re: No Shop Currency defined!
Post by: blackrat999 on July 02, 2019, 20:53:30 PM
Thanks for sticking with me!
I changed "payment currency" to British Pound from "default vendor currency" and Email currency is on "Vendor Currency"
tested and same error

I tried Debug and debug in file on - this seems to hang after clicking confirm purchase, i get all the debug info but cant complete it so not sure what help it would be, i have attached the url's it shows if that means anything to anyone?
Title: Re: No Shop Currency defined!
Post by: jjk on July 02, 2019, 23:35:32 PM
Do you have a PayPal error log in your htdocs/log folder?
Title: Re: No Shop Currency defined!
Post by: blackrat999 on July 03, 2019, 00:11:18 AM
I have a file called paypal.5.log.php in administrator/logs this is the content:

#
#<?php die("Forbidden."); ?>

2019-07-02 18:40:58 DEBUG plgVmConfirmedOrder: order number: VLW408
2019-07-02 18:40:58 MESSAGE plgVmConfirmedOrder: Amount/Currency stored 6.45 paymentcurrency 52 orderusercurrency52
2019-07-02 18:40:58 DEBUG PayPal request:: Array
(
    [cmd] =&gt; _ext-enter
    [redirect_cmd] =&gt; _xclick
    [paymentaction] =&gt; sale
    [upload] =&gt; 1
    [business] =&gt; info-xxxx@gingerxxx.co.uk
    [receiver_email] =&gt; info-xxx@gingerxxx.co.uk
    [order_number] =&gt; VLW408
    [invoice] =&gt; VLW408
    [custom] =&gt; 18ced6ec8b3e64004634ccd3baeb8895
    [currency_code] =&gt; GBP
    [address_override] =&gt; 0
    [first_name] =&gt; richard
    [last_name] =&gt; Hughes
    [address1] =&gt; test address
    [address2] =&gt;
    [zip] =&gt; EXxx 7DF
    [city] =&gt; great torrington
    [state] =&gt; EN
    [country] =&gt; GB
    [email] =&gt; rbhughexxxx@gmail.com
    [night_phone_b] =&gt; 01805 624208
    [return] =&gt; https://www.malbersfabrics.xx.xx/index.php?option=com_virtuemart&amp;view=vmplg&amp;task=pluginresponsereceived&amp;on=VLW408&amp;pm=5&amp;Itemid=101
    [notify_url] =&gt; https://www.malbersfabrics.xx.xx/index.php?option=com_virtuemart&amp;view=vmplg&amp;task=notify&amp;tmpl=component&amp;lang=
    [cancel_return] =&gt; https://www.malbersfabrics.xx.xx/index.php?option=com_virtuemart&amp;view=vmplg&amp;task=pluginUserPaymentCancel&amp;on=VLW408&amp;pm=5&amp;Itemid=101&amp;lang=
    [rm] =&gt; 2
    [bn] =&gt; VirtueMart_Cart_PPA
    [no_shipping] =&gt; 0
    [no_note] =&gt; 1
    [image_url] =&gt; https://www.malbersfabrics.xx.xx/images/stories/virtuemart/vendor/malbers-fabrics-north-devon-logo-250.png
    [item_name] =&gt; Order Number: VLW408
    [amount] =&gt; 6.45
)

2019-07-02 18:42:16 DEBUG plgVmConfirmedOrder: order number: 6LZQ09
2019-07-02 18:42:16 MESSAGE plgVmConfirmedOrder: Amount/Currency stored 6.45 paymentcurrency 52 orderusercurrency52
2019-07-02 18:42:16 DEBUG PayPal request:: Array
(
    [cmd] =&gt; _ext-enter
    [redirect_cmd] =&gt; _xclick
    [paymentaction] =&gt; sale
    [upload] =&gt; 1
    [business] =&gt; info-fxxxxx@gingerxxx.co.uk
    [receiver_email] =&gt; info-xxxxx@gingerxxx.co.uk
    [order_number] =&gt; 6LZQ09
    [invoice] =&gt; 6LZQ09
    [custom] =&gt; 18ced6ec8b3e64004634ccd3baeb8895
    [currency_code] =&gt; GBP
    [address_override] =&gt; 0
    [first_name] =&gt; richard
    [last_name] =&gt; Hughes
    [address1] =&gt; test address
    [address2] =&gt;
    [zip] =&gt; EXxx 7DF
    [city] =&gt; great torrington
    [state] =&gt; EN
    [country] =&gt; GB
    [email] =&gt; rbhughexxxx@gmail.com
    [night_phone_b] =&gt; 01805 624208
    [return] =&gt; https://www.malbersfabrics.xx.xx/index.php?option=com_virtuemart&amp;view=vmplg&amp;task=pluginresponsereceived&amp;on=6LZQ09&amp;pm=5&amp;Itemid=101
    [notify_url] =&gt; https://www.malbersfabrics.xx.xx/index.php?option=com_virtuemart&amp;view=vmplg&amp;task=notify&amp;tmpl=component&amp;lang=
    [cancel_return] =&gt; https://www.malbersfabrics.xx.xx/index.php?option=com_virtuemart&amp;view=vmplg&amp;task=pluginUserPaymentCancel&amp;on=6LZQ09&amp;pm=5&amp;Itemid=101&amp;lang=
    [rm] =&gt; 2
    [bn] =&gt; VirtueMart_Cart_PPA
    [no_shipping] =&gt; 0
    [no_note] =&gt; 1
    [image_url] =&gt; https://www.malbersfabrics.xx.xx/images/stories/virtuemart/vendor/malbers-fabrics-north-devon-logo-250.png
    [item_name] =&gt; Order Number: 6LZQ09
    [amount] =&gt; 6.45
)


I have obviously adjusted some links
Title: Re: No Shop Currency defined!
Post by: blackrat999 on July 04, 2019, 08:49:35 AM
Does the log data mean anything to anyone please?
Title: Re: No Shop Currency defined!
Post by: jjk on July 04, 2019, 10:09:44 AM
My log looks different. Reason might be your customized template. Perhaps test with a non-customized template (at least for the cart view).
BTW - I would eliminate the state selection in the cart. It's not used by British postal services.
Title: Re: No Shop Currency defined!
Post by: blackrat999 on July 04, 2019, 10:32:08 AM
Thanks again.
I have removed the State selection.
Also tried switching templates for the cart, it obviously looked horrendous but the cart completed fine, with the same error :-(
Title: Re: No Shop Currency defined!
Post by: AH on July 04, 2019, 11:21:49 AM
It looks like you will need to give someone access to your configurations in order to help resolve this issue.

This is not a Normal issue and will be down to some configuration or setup for this site

I note that there is an option for language choice??  When I go to the admin page ??  This again tells me something is not "normal" with this site.

How was it crated in the first instance?

Title: Re: No Shop Currency defined!
Post by: blackrat999 on July 04, 2019, 12:01:54 PM
This site started as an Akeeba clone of another site - https://www.easyhit.co.uk this one has no such issues at all and has the same language option in the admin, im not sure how to turn that off but it isnt likely to be the issue i have with the error because it works fine on the other site.
Title: Re: No Shop Currency defined!
Post by: AH on July 04, 2019, 14:40:10 PM
Cloning another site to make a new site is where your issue lies.

My suggestion:-

Create a new Joomla test instance from scratch 0 language will be English

Install your template

Install the latest VM

Configure the VM base settings - countries/taxes/shipment/payment methods etc

Copy the exsting product/category/manufacturer/media tables over to the database of this new instance.

DO NOT just copy all the VM tables en-mass

Test

You are unlikely to have your current issue.

Then you can work out what tables to load back to your live instance.



Title: Re: No Shop Currency defined!
Post by: blackrat999 on July 04, 2019, 15:16:17 PM
Why would cloning a site that works great to make a new one cause issues? To me that is the safest way to make sure it is all working and havent had any issues doing this before. I appreciate your suggestion though, not sure my phpadmin skills are up to it to be honest, massive nightmare.....
Title: Re: No Shop Currency defined!
Post by: Jörgen on July 04, 2019, 16:06:27 PM
Consider doing a new clone and pay attention to things that may be site specific. Do as little as possible before testing the payment. It may well be an issue with your new host.
Jörgen @ Kreativ Fotografi
Title: Re: No Shop Currency defined!
Post by: blackrat999 on July 04, 2019, 16:12:23 PM
Unfortunately the site is live now and sales and stock levels make that really hard. All my sites are hosted on the same server so i can rule hosting out.
Title: Re: No Shop Currency defined!
Post by: AH on July 04, 2019, 17:01:09 PM
QuoteWhy would cloning a site that works great to make a new one cause issues? To me that is the safest way to make sure it is all working and havent had any issues doing this before. I appreciate your suggestion though, not sure my phpadmin skills are up to it to be honest, massive nightmare.....

I do not know why or what. It may not have anything to do with cloning.  However  I know that my method will help identify and possibly resolve issues.

By making a completely new test installation - you take settings back under your control and go back to a "clean" install.

Porting over a few VM product category manufacturer tables is easily achieved - simple export - import using Heidisql

I am NOT suggesting doing this test on a live site!

Maybe someone here knows of a better way to identify or resolve this particular issue.  In the time it takes to wait for a better suggestion - you could get a new test site created and tested.

I am sorry this may not meet a "quick fix" just hit this button solution - but clearly all other suggestions below have failed and you started this thread on June 20th

By now you may have had it all working perfectly - language/payment etc.
Title: Re: No Shop Currency defined!
Post by: blackrat999 on July 04, 2019, 19:08:35 PM
I really appreciate your efforts for me thank you. My worry with this suggestion is purely my level of skills with phpadmin, im not sure im up to the task, i will have to keep experimenting.
thanks again