Product bundles and the order PDF
If you use the order PDF function to download or print orders, the constituent products of a product bundle won’t automatically be displayed in the PDF. To display the products you will need to add some code.
Adding the code
To add the code select HTML tab:
from the menu. On your live theme’s settings select theAfter the closing </tr> tag contained within the {% for product in order.products %} cycle add the following code:
{% if product.is_bundle %} <tr class="bundle-header"> <td></td> <td colspan="4"> Bundle Product Consisting Of: </td> </tr> {% for bundle_product in product.bundle_products %} <tr class="bundle-product"> <td> {{ bundle_product.sku }} </td> <td colspan="4"> {{ bundle_product.title }} {% if bundle_product.quantity > 1 %} x {{ bundle_product.quantity }} {% endif %} </td> </tr> {% endfor %} {% endif %}
Once you’ve added the code select save changes.
Then select the CSS tab:
Add the following code to the bottom of the file:
.products .bundle-header td { padding-top: 4px; padding-bottom: 3px; font-weight: 600; } .products .bundle-product td { padding-top: 0; padding-bottom: 0; color: {{ settings.color_other }}; padding-left: 23px; font-size: 10px; } .products .bundle-product td:first-child { padding-left: 0; }
Once you’ve added this code select save changes, and the constituent products of the bundle will then show in the order PDF.
If you want to display the warehouse notes for each product within a bundle, use the variable {{ bundle_product.warehouse_notes }}.