• freizeitmonster

    (@freizeitmonster)


    Hello Greg,

    I do not understand your mail documentation on your support website.
    What i try to achive is a custom mail text template with this text:

    Hello {$advert|meta:adverts_person},<p>
    your new advert was successfully published:<br>
    {$advert.post_title} (#{$advert.ID})<br>
    Category: {$advert|meta:advert_category}<br>
    Location: {$advert|meta:adverts_location}<br>
    Price: {$advert|price}<p>

    To visit your ad please follow this link:<br>
    {$advert.ID|get_permalink}<p>

    Thank you very much for your support.

    Do i have to registere the new mail template?
    And how?
    I don’t get it ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    registering new email templates is not really possible right now, you can only use the predefined templates available in wp-admin / Classifieds / Emails panel.

    That is, if you want to send a message with the content you wrote, then from the Emails panel you need to edit one of the available emails (preferably the one that is sent on advert publication), put your content in the Body field, make sure the “Is Active” checkbox is checked and save the template.

    Thread Starter freizeitmonster

    (@freizeitmonster)

    Thank you for your quick reply.
    I put this code in the text field as shown. But the custom codes (e.g. username, category, price) will not be displayed in the sent email.

    That’s why I am asking, if I have to register new mail templates.

    Plugin Author Greg Winiarski

    (@gwin)

    Hmm in which email specifically have you put this code? Can you paste the message name/code?

    Thread Starter freizeitmonster

    (@freizeitmonster)

    core::on_draft_to_publish_notify_user

    Do I have to check the ?send as html“ or not?
    I am using a plugin for styling the mails.

    Plugin Author Greg Winiarski

    (@gwin)

    If you want to send the message as HTML and not plain text then you should check the “send as HTML”.

    Except for the category which is a taxonomy and not a custom field your email template seems fine, if the values are not being displayed then maybe you are using different field names? I would need a link to the [adverts_add] form to check it.

    As for the category, you can display in the message the selected category using the following syntax

    
    {$advert|terms:advert_category}
    
    Thread Starter freizeitmonster

    (@freizeitmonster)

    The link is:
    https://myfreizeit.de/adverts/add/?preselected_pricing=259

    Pricing 259 is the free plan ??

    Plugin Author Greg Winiarski

    (@gwin)

    To get a location use {$advert|terms:advert_location} and to get price use {$advert|adverts_get_the_price} other than that the variables in your email seem to be fine.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Custom mail template’ is closed to new replies.