E-Mail Templates

Kurze Dokumentation zur Verwendung von E-Mail Templates in Kombination mit mpXgastronomy.

Soll in der “Order Confirmation”-Email beispielsweise der Name der Filiale ausgegeben werden, kann folgender Code verwendet werden:

{{ order.extensions['mrpixGastronomy'].store.name }}

Natürlich können auch weitere Informationen ausgegeben werden. Unterhalb ist ein kurzer Dump-Auszug, einer typischen Bestellung.

Kurzer Dump-Auszug
order.extensions['mrpixGastronomy']

"mrpixGastronomy" => Mrpix\Gastronomy\Extension\Checkout\Order\GastronomyOrderExtensionEntity {#9804 ▼ #orderId: "969773ccc59144539bbb36fe7a746e46" #storeId: "a56439a1cd7648419f05b48a1481a5e7" #preorderTime: DateTimeImmutable @1629838800 {#9809 ▼ date: 2021-08-24 21:00:00.0 UTC (+00:00) } #estimatedTime: DateTimeImmutable @1629838800 {#9810 ▼ date: 2021-08-24 21:00:00.0 UTC (+00:00) } #isDelivery: true #_uniqueIdentifier: "cec3334fd650491ba0425ed0ce6fdf12" #versionId: null #translated: [] #createdAt: DateTimeImmutable @1629835212 {#9815 ▶} #updatedAt: null -_entityName: "mrpix_gastronomy_order" #extensions: array:2 [▶] #id: "cec3334fd650491ba0425ed0ce6fdf12" +"store": Mrpix\Gastronomy\Entity\Store\StoreEntity {#9811 ▼ #active: true #name: "Neumarkt" #printerName: "Pixeldrucker" #addressCountry: "Deutschland" #addressZipCode: 92318 #addressTown: "Neumarkt" #addressStreet: "Holzgartenstraße" #addressHouseNumber: 8 #email: "info@mr-pixel.de" #phone: "09181 50988-0" #openhourMondayOpen: "09:00" #openhourMondayClose: "22:00" #openhourMondayBreakStart: "12:00" #openhourMondayBreakEnd: "13:00" #openhourMondayNoBreak: false #openhourMondayClosed: false #openhourTuesdayOpen: "09:00" #openhourTuesdayClose: "23:30" #openhourTuesdayBreakStart: "15:00" #openhourTuesdayBreakEnd: "18:00" #openhourTuesdayNoBreak: false #openhourTuesdayClosed: false #openhourWednesdayOpen: null #openhourWednesdayClose: null #openhourWednesdayBreakStart: null #openhourWednesdayBreakEnd: null #openhourWednesdayNoBreak: false #openhourWednesdayClosed: false #openhourThursdayOpen: "14:20" #openhourThursdayClose: "20:00" #openhourThursdayBreakStart: "12:00" #openhourThursdayBreakEnd: "13:00" #openhourThursdayNoBreak: false #openhourThursdayClosed: false #openhourFridayOpen: "09:00" #openhourFridayClose: "22:00" #openhourFridayBreakStart: "12:00" #openhourFridayBreakEnd: "13:00" #openhourFridayNoBreak: false #openhourFridayClosed: false #openhourSaturdayOpen: null #openhourSaturdayClose: null #openhourSaturdayBreakStart: null #openhourSaturdayBreakEnd: null #openhourSaturdayNoBreak: false #openhourSaturdayClosed: false #openhourSundayOpen: null #openhourSundayClose: null #openhourSundayBreakStart: null #openhourSundayBreakEnd: null #openhourSundayNoBreak: false #openhourSundayClosed: false #maxOrdersPerHour: 1 #stressDelayFactor: 0.8 #excludeProductTags: null #_uniqueIdentifier: "a56439a1cd7648419f05b48a1481a5e7" #versionId: null #translated: [] #createdAt: DateTimeImmutable @1628231576 {#9816 ▶} #updatedAt: DateTimeImmutable @1629835043 {#9817 ▶} -_entityName: "mrpix_gastronomy_store" #extensions: array:2 [▶] #id: "a56439a1cd7648419f05b48a1481a5e7" } +"order": null }

 

Beispiel E-Mail-Template-Snippets

 

{% if order.extensions['mrpixGastronomy'].preorderTime is null %} <strong>Erwartete Zeit:</strong> {{ order.extensions['mrpixGastronomy'].estimatedTime|format_datetime('medium', 'short', locale='de-DE') }} {% else %} <strong>Vorbestellung:</strong> {{ order.extensions['mrpixGastronomy'].preorderTime|format_datetime('medium', 'short', locale='de-DE') }} {% endif %} <br><br> <strong>Filiale:</strong><br> {{ order.extensions['mrpixGastronomy'].store.name }}<br> {{ order.extensions['mrpixGastronomy'].store.addressStreet }} {{ order.extensions['mrpixGastronomy'].store.addressHouseNumber }}<br> {{ order.extensions['mrpixGastronomy'].store.addressZipCode }} {{ order.extensions['mrpixGastronomy'].store.addressTown }}<br> {{ order.extensions['mrpixGastronomy'].store.addressCountry }}<br> <br>