Author Topic: The best way to send a confirmation e-mail to a manufacturer  (Read 841 times)

amedesign

  • Beginner
  • *
  • Posts: 25
  • A beginner
The best way to send a confirmation e-mail to a manufacturer
« on: February 03, 2019, 15:09:06 pm »
Hi,

For the first: Joomla! 3.9.2 and VirtueMart 3.4.2. Tried to search on forum about this question but no answers for the similar one or not exactly the same need from related questions.

On my store, I have some products from different manufacturers, need to send a confirmation e-mail to them if a product manufactured by them is ordered.

Maybe the best way (and most difficult) is to have the possibility to let the manufacturers to have their own account and see there the history of orders related to their products. But this could be a future development or maybe there is already an extension for this, I didn't found such extension.

The second way is to override a template to add also the manufacturer (if there is a specific one, not set to "nothing" as it is by default for a new product) e-mail, as it is for the owner of the shop, or for the added e-mails (set in "Additional vendor email addresses"), or for the vendor if there is a multivendor shop.

Looking (searching) some hours in php templates found that the variable for e-mail manufacturer is "mf_email" but I am not sure where is the sending procedure for other e-mails when the order status is sent (order done or changins order status), when an order is made on site. I found something similar for sending to vendors (in \administrator\components\com_virtuemart\models\orders.php or related to this , with the variable order_email.

But I don't know what template to override and of course, what is the variable for manufacturer e-mail (including the call of it in that overrided template or sublayout). Hope that I was clear in my explanation for this need, if not, excuse my non native English. To add manufacturer email address in "Additional vendor email addresses" is not a solution because not all the products are from the same manufacturer so a manufacturer will not be happy to receive status orders from another manufacturer. :)

First try was to consider each manufacturer as vendor (to have the possibility for each "vendor" (but read "manufacturer") to control the selling of their products, to have a history of orders, to receive the orders related to them) and activated multivendor shop. But this is also not a solution because all the transport, production, adding all the products are set by a single vendor, the owner of the shop.

Thanks for any suggestion.

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 2044
    • Kreativ Fotografi
  • VirtueMart Version: 3.2.12
Re: The best way to send a confirmation e-mail to a manufacturer
« Reply #1 on: February 03, 2019, 20:03:08 pm »
Afaik there is no notify manufacturer, there is a notify vendor e-mail which to me sounds more like the normal way to run a shop. I would think Your request is quite unusual. What does the manufacturer do with this email? He has not access to the shop, what is he going to do with this information ?

This looks like a work for custom programming.

Jörgen @ Kreativ Fotografi
Joomla 3.8.3
Virtuemart 3.2.12
Olympiantheme Hera (customized)

amedesign

  • Beginner
  • *
  • Posts: 25
  • A beginner
Re: The best way to send a confirmation e-mail to a manufacturer
« Reply #2 on: February 03, 2019, 21:30:36 pm »
Thank you Jörgen for reply.

Could sound unusual but seems that more than one asked for this question. :) The answer is simple, is related to the commision paid to the manufacturers for their products sold in the platform. Because you are a photographer I am sure that you will understand very well this demand.

In my case, I am selling prints. The photographers send me images and the customers choose one image or another to be printed. Each photographer will receive a commision for each image that will be sold as a print (framed or not). The photographers are like manufactures (according to the definition of Virtuemart) they are not vendors because their images are just a part of the final product sold in the shop, they are not managing the shop or production or transport or payment. Of course they could receive a forwarded e-mail from me, when a customer ordered a specific printed image but it will more professional to receive directly from the platform an "original" e-mail, send by system, not by me. It is a matter of more trust for them, otherwise they have no idea if their image is sold (chosen by customers) or not, so they could say that we could sell printed images (products) without paying them the licence for using the images. It is not the case for now, they have enough trust in me, at least with a big group of photographers I know. But who knows, could be some photographers I don't know them personally so to avoid any matter of trust, I have to think at some solution. I think that this situation "unusual" is also for other non-physical products (not necessary downloadable).

Another solution is to make an e-mail server filter to send a CC to the customers (based on some text from e-mail) but it is a bit complex when will be more photographers (manufacturers).

Hope that this explained case of situation is not looking unusual anymore. So going back to my question, regarding the possibility to override any template or sublayout, the principle should be simple. At least theoretically. If there is a manufacturer associated with a product then the order status will be send also to the manufacturer email, among with the e-mail sent to owner or to the list of e-mails written in "Additional vendor email addresses".

So if this is possible, what is the php template or sublayout to be overidden and if that variable (mf_email) is correct identified and how to call it from that part of template?

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3714
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: The best way to send a confirmation e-mail to a manufacturer
« Reply #3 on: February 04, 2019, 01:06:57 am »
I done a ordered product  view for manufacturers(this are photographer) so they can see wat was sold in the shop.
My customer use this to pay the photographer and photographer can control what was sold.
I dont have added email to manufacturer on order because if a product is cancelled for eg. my customer prefer to pay next month the photographer, but i think it's possible to do using a plugin trigger.

amedesign

  • Beginner
  • *
  • Posts: 25
  • A beginner
Re: The best way to send a confirmation e-mail to a manufacturer
« Reply #4 on: February 04, 2019, 12:44:20 pm »
Thank you Studio 42 for reply. I am not sure that I understood the concept. You meant that you create a specific template/sublayout or just a page which is viewed only by manufactures. They see only that ordered products are associated with the specific manufacturer, not all of them, correct? Where did they see this information? In their account? What is the variable used for calling this information (ordered product with a specific manufacturer)?

Sending an e-mail to the manufacturer isn't be more simple to do? I don't understand what you have written, if a product is cancelled, why should the photographer paid for? I imagine that if the order status is send to shop owner, with CC to that specific manufacturer, they will know if the product is cancelled or not. Or maybe I didn't understand corectly what you meant.

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3714
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: The best way to send a confirmation e-mail to a manufacturer
« Reply #5 on: February 04, 2019, 17:56:12 pm »
I get product from order item table joined to a specific manufacturer.
But i wrote a Joomla user plugin to associate an artist with a user.
So when the user is logged in , he can show he's own sold photos(products).
In back-end i added a view to show the artists(manufacturer) and another one to do bills.
In billing view you select the user and select the ordered items per artist(manufacturer) and you can create a bill and save as CSV a report with manufacturers.
I integrate Save as PDF and Email to send the Bills to artists ...
So all is possible, but not so simple.

amedesign

  • Beginner
  • *
  • Posts: 25
  • A beginner
Re: The best way to send a confirmation e-mail to a manufacturer
« Reply #6 on: February 04, 2019, 21:05:33 pm »
It seems to be very complicated, but I am sure that this was the needs for your customer. In my case the need is just to inform the specific manufacturer when an order is done. Just that. In this case is it complicate to do that? If the answer is yes, please tell me why? I see just a duplicate of sending procedure but within an if...else statement (related to the exist or not of a manufacturer associated to a product). Do you know where (in what file) the procedure to send the email to the shop owner and the list with "Additional vendor email addresses" is written?

I am am little bit confused that I didn't receive any oppinion if this notification/confirmation to the manufacturer is hard to implement it (and why) and most important is to get the name of that variable/those variables. Is this variable (or other) a secret or nobody knows about it? At least a way to found myself those variables... I can read if there is anywhere such documentation for Virtuemart, but I didn't find any documentation for developers, for version 3. I found only for version 1. Nothing there about my needs. Is anywhere on net any documentation of Virtuemart for developers. If there is no free of charge documentation I can even pay for it, if there is not a big sum for it.

Or maybe I wasn't to clear with the questions, so please tell me if it is not clear what I have written. Thanks.

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 2044
    • Kreativ Fotografi
  • VirtueMart Version: 3.2.12
Re: The best way to send a confirmation e-mail to a manufacturer
« Reply #7 on: February 04, 2019, 22:54:29 pm »
  • This is a free software
  • You have a specific request
  • You got a suggestion from Studio 42
  • You are free to learn the software and give free support like the rest of us
  • Nothing is secret, it is open software, but there are no free lunches, It will cost You time or money of it is not implemented

Jörgen @ Kreativ Fotografi
Joomla 3.8.3
Virtuemart 3.2.12
Olympiantheme Hera (customized)

amedesign

  • Beginner
  • *
  • Posts: 25
  • A beginner
Re: The best way to send a confirmation e-mail to a manufacturer
« Reply #8 on: February 04, 2019, 23:31:55 pm »
Jörgen, I really don't know why your answer is so harsh. :o I didn't ask for implementing for free, only for a name of a variable and the file where the notification of the e-mail after an order is made. I don't think the answer for this questions is in the category of "implementation" so it wasn't necessary to say " there are no free lunches, It will cost You time or money of it is not implemented".

I even say the I can pay the documentaton if there is such kind of documentation for version 3. I didn't find it.

Of course I am aware that any answer from the advanced users like you or Studio 42 are only because you were kind and answered to my post. You are not forced to answer at any (maybe stupid) questions from beginners so I appreciated your time for answering. But I really don't understand why your last answer was like that. Maybe my non native english language had the effect to be harsh too, so I appologies for that, if this is the reason.

Unfortunatelly, your replies (yours and Studio 42's) did not answer to my repetead question (the name of the variable and the name of the file the notification by email is done) so that's why I asked if this is a secret. Also I didn't find on net any developer documentation for version 3, so I thought that is not documented because of a reason. Yes, I want to learn more about this software but from where?

The suggestion I have got from Studio 42 is not applicable to me, not because it is to complicated to implement it but because it is useless for me. If I need such features be sure that I would buy the extension from him, as I already bought a lot of extensions for my shop.

But in this case, I asked (I think) a very simple question (ok, two questions, the name of variable and the location of the file) and nobody answer me at this, even I repeated them in each post. That's why I have asked if this is secret (please, without ofense) or nobody knows this.

Hope I will not get a more harsh answer, in that case I will give up and understand that is not my place here.  :-\

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27345
  • Always on vacation
    • Jenkin Hill Internet
Re: The best way to send a confirmation e-mail to a manufacturer
« Reply #9 on: February 04, 2019, 23:40:56 pm »
There is no built-in way to send an order email to a manufacturer. So there is no "name of the variable and the name of the file the notification by email is done"
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VM 3.4.3.10045 on Joomla 3.9.5 PHP 7.0.33
Testing VM 3.4.5.10045 on Joomla 3.9.5

amedesign

  • Beginner
  • *
  • Posts: 25
  • A beginner
Re: The best way to send a confirmation e-mail to a manufacturer
« Reply #10 on: February 04, 2019, 23:54:39 pm »
Thank you very much jenkinhill. I know there is no built-in way to send an order email to the manufacturer so it is normal that there is no  "name of the variable and the name of the file the notification by email is done".
Have to split that question in two parts. The variable and the location.

1. The variable in disscusion was mf_email, called from sql table. I asked if this is the variable I need to use for manufacturer email.
2. The location (the file) was for the existent notification to the shop owner and to the other e-mails (set in "Additional vendor email addresses") after an order is done. Studying this existent procedure maybe I can solve my need.

It appears that really my English is very bad, that's why I couldn't make myself very clear. Sorry.

Hope that now is more clear.

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3714
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: The best way to send a confirmation e-mail to a manufacturer
« Reply #11 on: February 04, 2019, 23:57:55 pm »
Modify the orderdone.php
Get the order number
Get the products in order
group products per manufacturer
Set email in the manufacturer
And send him an email on getting the price in the cart.
This is the base to do it(or using a plugin should work too)

amedesign

  • Beginner
  • *
  • Posts: 25
  • A beginner
Re: The best way to send a confirmation e-mail to a manufacturer
« Reply #12 on: February 05, 2019, 00:05:47 am »
This is a very good idea to start from, Studio 42. Thank you very much.

pinochico

  • Beginner
  • *
  • Posts: 18
Re: The best way to send a confirmation e-mail to a manufacturer
« Reply #13 on: February 05, 2019, 19:40:38 pm »
Maybe can we change our new version VM Email Manager and add new function?

I thinking about it :)

amedesign

  • Beginner
  • *
  • Posts: 25
  • A beginner
Re: The best way to send a confirmation e-mail to a manufacturer
« Reply #14 on: February 05, 2019, 21:13:11 pm »
Sorry for my lack of knowledge pinochico, but what is VM Email Manager? An extension for Virtuemart it appears, but what is doing? I have searched on net and found a discution about the component that no longer exists. Is this one about or it is another one? Any link?