News:

Support the VirtueMart project and become a member

Main Menu

Set Store Owner [Solved]

Started by Sydiom, February 01, 2013, 00:11:07 AM

Previous topic - Next topic

Sydiom

Frustrated!

I had a go at using the Virtuemart Tools and Migration to Set Store Owner.

Because I was the site developer, I was the first registered. Now the site simply won't let me change the store owner. So when someone buys a product, the confirmation email comes from me instead of my client. Changing my email on Joomla to my clients email has not made the slightest difference.

I am using Joomla 2.5.6 and VM 2.0.6.

PHP Built On
Linux
Database Version
5.1.59-community-log
Database Collation
utf8_general_ci
PHP Version
5.2.17
Web Server
Apache
WebServer to PHP Interface
cgi-fcgi
Joomla! Version
Joomla! 2.5.6 Stable [ Ember ] 19-June-2012 14:00 GMT
Joomla! Platform Version
Joomla Platform 11.4.0 Stable [ Brian Kernighan ] 03-Jan-2012 00:00 GMT
User Agent
Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)


After lots of forum searching I followed the advice and did this:

1) I went to Users/User managers
2) Wrote down the ID of the registered person that should be the store owner.
3) Enabled database update tools in Virtuemart configuration
4) Went to Tools/Tools and Migration and select the Migration tab on the right
5) Selected "Set store owner"
6) filled in the ID of the registered person that should be the store owner.

No effect at all. I did a test payment and the confirmation email still shows myself, the original person that registered with the website, as the store owner and not my client.

I have really scoured this forum for answers and tried to do this according to all the advice but all in vain so far.

jenkinhill

#1
I'm not sure that worked with 2.0.6  We are now at 2.0.18a with 2.0.18b to be released very soon. Versions below 2.0.10 are considered as unsecure.

Alternate way to set vendor is to open the database in phpMyAdmin and look at  table ###_virtuemart_vmusers   The user_is_vendor should be set to 1 for the shop owner and also set virtuemart_vendor_id to 1.
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

Sydiom

Thank you Jenkin

I did that. I changed the vendor to 1 for the user that should be the shop owner but to my absolute astonishment, it is still sending the confirmation email as if it is me. And the email appears in my inbox when i do a test order is NOWHERE in the administrator side of the website. I checked through all the registered users in Joomla and all the shoppers in Virtuemart and all the recorded details for the Vendor in Shop.

Nothing.

So the question is - where does the system get the email address from when sending the purchase confirmation email? And I don't mean on the administrator side (unless I have missed something), I mean somewhere it is cemented into the system that the vendors address is my address and I am wondering if it has been recorded in a .php or similar file somewhere? And all efforst in the administrator side and the changes to the phpmyadmin table are not fixing it.

Sydiom

The issue is this:

Once I had gone through the process of changing the Store owner in phpmyadmin (thank you Jenkin Hill) it was still going not sending the email from the vendor.

A colleague pointed out that in the Global Configuration in Joomla, on teh Servers tab, the Mail Settings were still set to my original settings when I first registered.

Changing the name and email there FINALLY solved my problem.

thinkroomten

One of the functions (getUserIdByVendorId) in the vendors model is causing this issue, it is easy to fix.
administrator > models > vendor

Around line 128 you need to change:
$query = 'SELECT `virtuemart_user_id` FROM `#__virtuemart_vmusers` WHERE `virtuemart_vendor_id`=' . (int)$vendorId ;

To:
$query = 'SELECT `virtuemart_user_id` FROM `#__virtuemart_vmusers` WHERE `virtuemart_vendor_id`=' . (int)$vendorId .' AND `user_is_vendor`=1' ;

Otherwise it just returns the first vmuser in the list (usually the developer).

I hope this helps.

Milbo

This can be only a problem, when you are using a migrated store. in vm2 and vm3, any vendor_id in the vmusers table is unique
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/