Developer forum

Forum » Templates » Mailtrigger on ecom product

Mailtrigger on ecom product

Hans Ravnsfjall
Hans Ravnsfjall
Reply

Hi

We have a costumer who want a solution where it is posible for a visitior - when you are on a productpage - to fill out a form that triggers an email being sent to the visitor, with productspecific documents - preferrable attached to the mail (mostly pdf´s)

The documents that are to be attached to the email, we will get from fields on the product itself

Can this be done somehow, eg by using the product viewer and forms for editors in conjunction?

Can it be done using Razor templates, or would we have to make a custom module for this feature?

/Hans


Replies

 
Nicolai Pedersen
Reply

Hi Hans

You can use forms for editors on a product with some kind of logic that will add information about what product the visitor is seing to hidden fields in the form.

When form submits, you can in the receipt razor template send a mail (that would be a mail number 2 for the user) that will include the attachments from the product. This is done by reading data from the form submit, find the product, locate pdf references from the fields, and create an email object and send it using the EmailHandler.

So it is doable - but requires a bit of coding and creative thinking. Let me know if you want us to help on that (by the hour)

Thanks, Nicolai

 

You must be logged in to post in the forum