VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: baroen on May 14, 2012, 16:31:04 PM

Title: email to admin when order is placed
Post by: baroen on May 14, 2012, 16:31:04 PM
I know it tis possible, but I cannot find the setting anywhere to get VM2 to send a email to the administrator every time an order is placed.
Can anyone tell me where I can find this setting?
Thanks is advance.
Jeroen
Title: Re: email to admin when order is placed
Post by: woood77 on May 14, 2012, 17:41:17 PM
I'm having the same issue.

How do you select what user gets the new purchase notifications?

Thank you
Title: Re: email to admin when order is placed
Post by: John2400 on May 15, 2012, 11:51:51 AM
Hi ,

The administrator is not really getting the order the "vendor Is" you need to set the vendor in Tools>>control panel>>shoppers>>
pick one "click one and then the green Vendor Button" and the vendor receives the emails.

Just make sure you have the email settings correct in the store and in the joomla>>users too.
Title: Re: email to admin when order is placed
Post by: woood77 on May 21, 2012, 19:03:38 PM
Hi John,

I've actually tried that.  I made a different user the vendor which does work however the notification email still comes to the original vendor/user. I double checked the email address on that vendor in Virtuemart and the user manager and it is correct.

This is very strange and a big problem.  I appreciate any additional suggestions.

Thanks for your help
Title: Re: email to admin when order is placed
Post by: celticwebs on June 02, 2012, 21:08:19 PM
Have you tried setting the person who IS getting the emails to be NOT a vendor?  So there is only one vendor setup ?

I think if you have 2 vendors set it just emails the original one and ignores the 2nd anyway.
Title: Re: email to admin when order is placed
Post by: aerobot on June 16, 2012, 03:49:53 AM
Quote from: John2400 on May 15, 2012, 11:51:51 AM
Hi ,

The administrator is not really getting the order the "vendor Is" you need to set the vendor in Tools>>control panel>>shoppers>>
pick one "click one and then the green Vendor Button" and the vendor receives the emails.

Just make sure you have the email settings correct in the store and in the joomla>>users too.

I have tried all the above, and still no luck? I have no idea why something seemingly so simple is just not working...
Title: Re: email to admin when order is placed
Post by: John2400 on June 16, 2012, 04:01:14 AM
I suppose my question would be ?

Have you set the vendor up as I described and then you don't get emails. Or is that email getting no emails.
can you send and receive from that email?
*

* does Joomla send an email out if you are using say the contacts page. _ this is outside of virtuemart and is in joomla section?

* could you also state - versions of software - you are using. Yes emails can be frustrating -  Maybe - Just make sure the vendor or user is a super admin , that they the super admin can receive joomla (configuartion emails) and then make them the vendor-
Title: Re: email to admin when order is placed
Post by: woood77 on June 26, 2012, 18:09:41 PM
Hi John,

I have set up the Vendor as you described and removed all other users as vendors.  I verified in the database via phpmyadmin that the user I want to receive the emails is in fact the vendor with no other users being a vendor.  However, the emails still come to my user even though it is not a vendor.  It seems that whatever user installs Virtuemart is the user that gets the emails.  Despite changing the vendor to a different user.

I don't know where else to look, in the meantime I'm forwarding all orders to my client.  I'd love to get this fixed.

Thanks again.
Title: Re: email to admin when order is placed
Post by: John2400 on June 26, 2012, 22:40:57 PM
Hi,

I have a similar issue in 2.0.7 H f you are using that version. I have reported this issue in other posts-.
My response is that I am now waiting for an update to see if this corrects for me as well.  maybe, just maybe this is a joomla new issue and not VM.

*infact when I add a new user - the email or the user and the vendor end up in the same - users (user information) - just see in VM user if there are two different emails.

This might not help you but will explain why the emails are coming through.  - I now wait as well.
Title: Re: email to admin when order is placed
Post by: RevoLion on October 25, 2012, 20:00:10 PM
Right now my customer gets an email and I (admin) get an order confirmation email. The email I get though has my stores email in it instead of my customers email so I do not know who it is coming from to reply to them instantly. Does anyone know how to change this to show my customer's email address on the email to the admin or store owner?

Kindest Regards,
Jeremy
Title: Re: email to admin when order is placed
Post by: John2400 on October 26, 2012, 07:32:00 AM
RevoLion,

What you need to tell us is what version you are using - these issues have been solved in many updates. Just put up your version and maybe an image of your admin email - yes block out the private issues.
Title: Re: email to admin when order is placed
Post by: remeedella on October 31, 2012, 06:42:40 AM
I am trying to fix http://forum.virtuemart.net/index.php?topic=109425.0  to no avail and no one is helping me, but so far I think i've come across how to solve your problem after trying to fix my issue :S

So here's what i think you need to do,

You can either try going to your shoppers in virtuemart and selecting everyone and choosing NOT A VENDOR. And then you can choose Is a vendor for only the account in which you want to be the vendor account. Usually this account shows up under 'shop' and copies over the information and the e-mail or you can change the e-mail directly under 'shop.' If this works correctly but it might not work in the database, i think this may be a jUpgrade issue which I also came across because I had this issue on a migrated website.

Be sure to double check in phpmyadmin for j25_virtuemart_vmusers and browse in that for any users that have user_is_vendor set to 1, disable them and give them no vendor Id either, set that to "0". Now change the one account you do want to be the vendor or to have the e-mail address used for registrations/invoices (your shop) and set the vendor id to 1 and the user_is_vendor to 1 for that account by searching via it's virtuemart user id.

This should deffinately alter the information under 'shop' thereafter.

This should solve your problem but not my problem where I want a seperate e-mail address only for user registration confirmation e-mails or to disable that feature
Title: Re: email to admin when order is placed
Post by: thinkroomten on September 23, 2015, 14:18:25 PM
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).
Title: Re: email to admin when order is placed
Post by: Milbo on September 24, 2015, 10:23:28 AM
This is maybe working, but would be a wrong general fix. It is maybe necessary if the shop got migrated and the vendorid clean up function did not work correctly.

in vm1 a user had a vendorId for the vendor he belongs to, in vm2/vm3 only vendors have an idea,... in vm3 the reference between shoppers and a vendor is stored in an extra table.