Booked Scheduler Community Support
February 22, 2020, 05:32:50 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Custom attributes in notification email  (Read 220 times)
dimoxilo
Newbie
*

Karma: 0
Posts: 2


« on: January 09, 2020, 03:38:12 AM »

Hi,

I would like to use a custom attribute (i also know  this ID) in a notification email (for new reservation)

I tried several solutions found in topics but I can't get them to work.


Is there a preexisting variable to call a custom attribute ?? (like {$customAttributeID}  would be awesome..



My last test :

in ReservationEmailMessage.php


Code:
foreach ($attributes as $attribute)
{
$attributeValues[] = new Attribute($attribute, $this->reservationSeries->GetAttributeValue($attribute->Id()));

if($attribute->Id() == 4)
$this->Set('MyID', $this->reservationSeries->GetAttributeValue($attribute->Id()));
}

After i would hope to put {$MyID} in ReservationCreated.tpl

But it doesn't work.


Thanks for help.
Regards

Booked Scheduler v2.7.7
Logged
dimoxilo
Newbie
*

Karma: 0
Posts: 2


« Reply #1 on: January 09, 2020, 04:09:44 AM »

OK i solved myself.

In french translate the ReservationCreatedAdmin.tpl was not complete... like the en_us version...


Just Add
Code:
{if $Attributes|count > 0}

<br/>

{foreach from=$Attributes item=attribute}

<div>{control type="AttributeControl" attribute=$attribute readonly=true}</div>

{/foreach}

{/if}

Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!