VirtueMart Forum

VirtueMart 2 + 3 + 4 => Installation, Migration & Upgrade => Topic started by: Piwo on July 08, 2016, 11:25:17 AM

Title: Contact not working for products: Invalid Address
Post by: Piwo on July 08, 2016, 11:25:17 AM
Joomla! 3.5.1
VirtueMart 3.0.12
PHP Version   5.6.22
Joomla Platform 13.1.0


Hey I am having a problem with the contact application within a product, not the general contact application (this is working):

Please follow "Stellen Sie eine Frage zu diesem Produkt" e.g. on this page: http://casa-eurabia.de/runde-tische/mosaiktisch,-100-cm-detail.

Once trying to send a message the following error apears: INVALID ADDRESS: ...It appears the page you were looking for doesn't exist. Sorry about that.

The contact application is working if I  will rewrite an email adress in the field: "Name" and the Name in the field "Email" . I also contacted the template provider Gavick, but couldnt help: https://www.gavick.com/forums/storefront-joomla3/email-contact-invalid-adress-ads-51713.


Please help :)
Title: Re: Contact not working for products: Invalid Address
Post by: jenkinhill on July 08, 2016, 13:05:48 PM
You did not search the forum for this issue? Discussed too many times here. You should use at least VM3.0.16 with Joomla 3.5.1 unless you have patched your core.  See http://forum.virtuemart.net/index.php?topic=133760.0

http://dev.virtuemart.net/projects/virtuemart/files
Title: Re: Contact not working for products: Invalid Address
Post by: Piwo on July 08, 2016, 15:35:15 PM
Hey, thanks for the reply!

have updated to VM 3.0.16 but did not work. I also tried the update 3.0.17.2 but did not work either. It seems it may relate to this  last post in the forum:http://forum.virtuemart.net/index.php?topic=133760.30. But I am not very good with the codes. Is there any other way you could suggest?

The update does not seem to fix the "Send to a friend" or the "Ask a Question" emails.
I think we need to change the code a bit to something like this, does anyone have an easy way of getting the vendor email/name/id?

if(isset($view->orderDetails['details']) && isset($view->orderDetails['details']['BT'])) {
            $replyTo[0] = $view->orderDetails['details']['BT']->email;
            $replyToName[0] = $view->orderDetails['details']['BT']->first_name . ' ' . $view->orderDetails['details']['BT']->last_name;
         } else {
            if(isset($view->user->email) && $view->user->name) {
               $replyTo[0] = $view->user->email;
               $replyToName[0] = $view->user->name;
            }
            elseif (isset ($view->vendor->vendor_name)) {
               $replyTo[0] = $view->user['email'];
               $replyToName[0] = $view->user['name'];
            }
            else {
               //coming from send to a friend or ask a question, so no order details
               //get vendor email from config / db
            }
         }

Thanks
Title: Re: Contact not working for products: Invalid Address
Post by: jenkinhill on July 08, 2016, 16:10:17 PM
In case it is the Gavick template overrides causing your problem, can you test using Protostar?
Title: Re: Contact not working for products: Invalid Address
Post by: GJC Web Design on July 08, 2016, 21:33:35 PM
from what file is the above code?
Title: Re: Contact not working for products: Invalid Address
Post by: Piwo on July 09, 2016, 11:13:29 AM
It is not my code but I found it the forum: http://forum.virtuemart.net/index.php?topic=133760.30 with no answer and it might be the same problem?
Title: Re: Contact not working for products: Invalid Address
Post by: Piwo on July 09, 2016, 14:06:56 PM
I was testing the problem with protostar but still get a similar problem (please see the screenshot)
Title: Re: Contact not working for products: Invalid Address
Post by: StefanSTS on July 10, 2016, 20:06:30 PM
For the Google result finders.

Another reason for this issue might be a not valid email address of the vendor.

In VM configuration -> shop -> shop, please check, if your vendor has a proper email address and if the vendor and the corresponding joomla user have the same ID.

If your vendor has a wrong ID, you can set the right ID in VM Menu -> Tools. In the tab migration at the very end you can set the ID of the shop owner.
Make sure you enable the database tools in VM config in first tab before using the tools.

Here you go
Stefan