Javascript API

Sending Directions

Send mail with directions link to user

With Woosmap Javascript API you can send directions mail to your users from your store locator in order to help them going to your shops. Directions mails are customizable with some restrictions due to email client software.

Mail Template

To customize your mail you should provide a custom template.

Example

Hello,
<div style="color:red;">
    Click on <a href="{{ directions_url }}">this link</a>
     to open direction to {{ properties.store_name }}
</div>
Have a nice day

Access to variable

As you can see in the previous example, you are able to access some variables in your mail template.

  • directions_url, the redirect url for user
  • properties, all the properties of the store in the database (including user_properties)

Example

<div>Les types de {{ properties.store_name }} sont :</div>
<ul>
    {% for type in properties.types %}
        <li>{{ type }}</li>
    {% endfor %}
</ul>

The template, the sender and the subject of your mails could be configured when the Project is created.