Email Template Update
Ensure that the option "Use a custom line item type instead of the default 'Product' line item type" is enabled in the plugin configuration.
Replace the existing email template code with the following updated code:
{% if nestedItem.children.count > 0 %} {% set nestingLevel = nestingLevel + 1 %} {% for lineItem in nestedItem.children %} {% set nestedItem = lineItem %} {{ block('lineItem') }} {% endfor %} {% endif %}
You need to replace the above code with the code below:
{% set hidebundleProductPriceinInvoice = config('ZeobvBundleProducts.config.hideBundleChildlineItemsOnOrderConfirmationMail') %} {% if nestedItem.children.count > 0 %} {% set nestingLevel = nestingLevel + 1 %} {% for lineItem in nestedItem.children %} {% set nestedItem = lineItem %} {% if nestedItem.type === 'bundle_product_item' %} {% if hidebundleProductPriceinInvoice == '1' %} {% else %} {{ block('lineItem') }} {% endif %} {% else %} {{ block('lineItem') }} {% endif %} {% endfor %} {% endif %}
Steps to Test
Confirm Plugin Configuration: Ensure the following plugin options are enabled:
"Hide bundle sub-items on order confirmation email."
"Hide bundle sub-items on invoices and delivery documents."
"Use a custom line item type instead of the default 'Product' line item type."
Order Confirmation Email:
Place a test order for a bundled product.
Verify that sub-items are hidden in the order confirmation email.
Invoices and Delivery Documents:
Generate an invoice or delivery document for the test order.
Confirm that sub-items are hidden as per the configuration.
Theme Compatibility: Test with both standard Shopware themes and custom themes to ensure consistent functionality.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article