Technical Support
posted this on June 13, 2009 18:11
Booking Operators and suppliers receive a copy of any email sent by the system. You can configure this recipient in the Webmaster Area > Settings > Booking management email.
Templates created before March 2009 didn't include the option of supplier notification, but If you are familiar with TouristWay SDK you can enable it by changing the configuration in the file "/templates/RAW/booking.html".
Replace the node:
<component id="booking" class="booking">
[etc. etc. etc.]
</component>
with the following:
<component id="booking" class="booking">
<action id="bindaccount">
<!-- account binding -->
<affiliateid>%-form.aid-%</affiliateid>
<customerid>%-form.uid-%</customerid>
</action>
<action id="update">
<!-- details update -->
<passengers>%-form.pgrs-%</passengers>
<notesretail>%-form.notesretail-%</notesretail>
<notesinternal>%-form.notesinternal-%</notesinternal>
<noteswholesale>%-form.noteswholesale-%</noteswholesale>
<resnumber>%-form.resnumber-%</resnumber>
<reslabel>%-form.reslabel-%</reslabel>
<resfamily>%-form.resfamily-%</resfamily>
<retrieve>servicesupplier</retrieve>
<triggers>
<trigger id="resvswitch" class="resflow">
<condition>
('%-old.booking.header.status-%'ne'%-form.status-%')
</condition>
<switchtostatus>%-form.status-%</switchtostatus>
<resid>%-form.pid-%</resid>
</trigger>
<trigger id="resvconfirmation" class="message">
<condition>'%-old.booking.header.status-%'ne'%-booking.header.status-%'</condition>
<from>%-global.bookingdeptemail-%</from>
<usetemplate>%-system.lngtemplatepath-%email/resvconfirmation.html</usetemplate>
<debug></debug>
</trigger>
<trigger id="suppliernotification" class="message">
<foreach>service IN booking.services</foreach>
<condition>('%-service.supplier.email-%'ne'')AND('%-old.booking.header.status-%'ne'%-booking.header.status-%')</condition>
<from>%-global.bookingdeptemail-%</from>
<usetemplate>%-system.lngtemplatepath-%email/suppliernotification.html</usetemplate>
<debug></debug>
</trigger>
</triggers>
</action>
<action id="remove">
<serviceid>%-form.tid-%</serviceid>
</action>
<datasetalias>
<alias id="this">components.booking</alias>
<alias id="booking">components.booking.booking</alias>
</datasetalias>
<renderto>component_booking</renderto>
<resid>%-form.pid-%</resid>
<usetemplate>%-system.lngtemplatepath-%hlib/dssr/resvservice-%-account.type-%.html</usetemplate>
<include>
<lib id="include_resvheader">%-system.lngtemplatepath-%hlib/dssr/resvheader-%-account.type-%.html</lib>
</include>
</component>
A basic example of Supplier email template "suppliernotification.html" could look like this
<touristway>
<settings>
<subject>You have a reservation from %-global.projectname-%</subject>
<to>%-service.supplier.email-%</to>
</settings>
</touristway>
Hi!
your reservation status is currently "%-booking.header.status-%"
Reservation n.%-booking.header.resnumber-%,
and includes "%-service.details.name-%":
<%FOREACH item IN service.breakdown >
# %-item.details.name-%
</%FOREACH>
Thank you.
The Staff of %-global.projectname-%
ATTENTION: make sure to assign the product you are testing to a supplier with valid email BEFORE (!) creating the test reservation.