My client has asked if we can display Bundles in the Order Confirmation email, the same way they display in the Checkout.
Currently in the emails, the Bundle child products are displayed as separate items, with "Part of: [Bundle parent title] shown.
The Checkout displays these the other way round, like this:
Bundle parent title
Bundle child title
Bundle child title
Bundle child title
Does anyone know if it is possible to display them like this in email templates?
I spoke to Shopify Plus Support, who indicated that the above should be achievable, but that there isn’t any documentation currently on how to do this. They have submitted a request to have this included in the future.
Yes, you can update the order confirmation email template (liquid template) to achieve this.
For example, you can group bundle components under their parent product. Your bundle child products are displayed as separate items with a reference to the parent. Now, when a bundle_parent? is detected, the child components (bundle_components) are listed under the parent.
{% if line.bundle_parent? %}
{% for component in line.bundle_components %}
{% endfor %}
{% endif %}
I haven’t tested this but would definitely require a bit of finessing but that would get things started. I wasn’t able to really figure out a way to properly show the quantity of the “bundle” as well, as well as if the bundle has any product properties they just straight up get blown away by Shopify…
For the quantity could utilize a “bundle quantity” attached on the variants metafield and then calculate the bundle quantity off of that number.
However I can not see a way to get Bundles to work if you are trying to use product properties with the Bundle.