FAQ Q348: Can Planyo send only a single email notification for the entire shopping cart or bundle?

By default email notifications are sent for each reservation (with a unique ID). So in case of a shopping cart reservation, by default they will be sent for each reservation in the cart. In case of a bundle reservation, they will be sent for the bundle itself (which has a reservation ID) and for each item in the bundle (each one having its own reservation ID as well).

If you need only a single email to be sent for a shopping cart reservation, simply go to the Email / SMS notifications page, then click on Edit next to the desired event in the client column (e.g. reservation confirmed) and at the bottom of the page where you edit the notification (below the attachments) you'll see the checkbox Only send 'New reservation entered' and 'Reservation confirmed' notifications for the first shopping cart item. Selecting it will make sure that the notification gets sent only for the first shopping cart item. The tag $(reservation_details) which can be found in the email body by default will print all the cart items. If you wish to modify the way these items are printed, use the tags from the Shopping cart section of Q204, such as $(cart_details) or:
$(foreach:$(cart_items))
use any combination of the $(cart_item_....:$(it)) tags to print specific information about the cart reservation from current iteration
$(endfor)

The solution with selecting the checkbox above will only work for shopping carts and the new reservation and confirmation events. For bundles and other shopping cart notifications you'll need to use a different approach, based on the fact that Planyo will not send out notifications with empty email body. What you can do is simply put the entire email body inside a condition which checks if the current reservation is the first one in the shopping cart or the bundle.

For shopping cart reservations, your email body should look as follows:

$(if) $(is_first_shopping_cart_item) $(then)
put your entire email body here
$(endif)

For bundles, the email body should be:

$(if) $(is_bundle_item) $(then) $(else)
put your entire email body here
$(endif)

Basically the code above will prevent Planyo from sending notifications for items which are part of a bundle -- the notification will still be sent for resources reserved directly, not being a part of a bundle. The notification will be also sent for the bundle reservation itself. If you need to change the email body for the bundle reservation, e.g. listing all bundle items, then you can of course create a completely separate email template for given resource by clicking on the button Add resource-specific message at the bottom of the page where you define the email body. Resource-specific messages will be used instead of the standard messages, if available. You can use the tags from the Bundle section of Q204, e.g.:
$(foreach:$(bundle_item_count))
use any combination of the $(bundle_item_....:$(it)) tags to print specific information about the bundled reservation from current iteration
$(endfor)
$(foreach:$(bundle_coupon_count))
use any combination of the $(bundle_coupon_....:$(it)) tags to print specific information about the bundled coupon from current iteration
$(endfor)

Back to Frequently Asked Questions