Creating and editing a template

You can create or add templates by going to acme.custobar.com/settings/templates/ and clicking "Add New Template".

Add a new template

You can now start entering more details and edit the HTML

Template editing

  1. You have to give a name to the template.
  2. You can select the template kind by using the drop-down menu, for example if the template is for a banner or an SMS campaign. You may choose to make the template a test version or making it invisible to other users by ticking or un-ticking the relevant boxes.
  3. You can assign the details of the sender for the campaign, for example if you want to use different senders for B2B and B2C campaigns.
  4. You can paste your template code to the HTML editor and you can edit the template directly here if you so wish.
  5. If you are using different languages in your campaigns, you can assign each template and modules to a specific language.
  6. You can also view the template and preview it as Email.
  7. When ready, just hit the Create button. You will be able to further edit the template once it is created. Remember to hit the Save button at the bottom of the screen if you do!

When you start using templates, one possibility is to use responsive best-practice email template and build your visual email based on it. We have tested and use this one (the Responsive Template):

http://tedgoas.github.io/Cerberus/

If you are not using inline styles, make sure that this check box is not active. You should also include some Custobar specific tags to the message templates:

- Subject: {{ subject }}

- "If your message is not clear click this link": a href="--weblink--"

- Link to unsubscribe: href="--unsubscribe_link--"

Additional tags, which can be used in emails:

- Customers first name: --First name--

- Customers last name: --Last name--

- Discount code: --Code--

These tags can be used both in the message body as well as in the subject field.

Product data in emails:

- in the very top of the template insert this line: {% load tags %}

- Inside the table where the products will appear enter the following lines:

{% if products %} {% for list in products %} {% with list.0.fi as p %} {% if forloop.counter0|divisibleby:2 %}

- replace the product data with following tags:

Image:

<a href="{{ p.url }}"><img src="{{ p.image }}" alt="{{ p.brand }} {{ p.title }}" height="xx" width="yy" </a>

Product brand and title with a link:

<a href="{{ p.url }}">{{ p.brand }}<br>{{ p.title }}</a></h3>

Price: {% format_price p.price separator="," currency="€" %}

Price formatting: {% format_price p.price separator="," currency="€" %}

- In the end of the table:

{% endwith %} {% endfor %}