From ae1c3b7f3c00b0a2e63b73a4ba069d76b07146da Mon Sep 17 00:00:00 2001 From: Audrius Date: Wed, 9 Sep 2026 06:10:27 +0200 Subject: [PATCH] Render the order product line hook on every order product line An order product line had no extension point in the front office, only the page level displayOrderDetail hook, so a module could not show information next to one product of an order. Call displayOrderDetailProductLine at the end of the product cell of every line, next to the reference and the download link. It receives identifiers only - the order, the order detail row and the product - all of which the presented product already carries, so the partials stay self contained. The theme renders every line twice, once for the wide layout and once for the narrow one, and the single shipment templates hold those rows inline while the four line partials serve the multishipment ones. The call therefore goes in eight places, and a module's output follows the same duplication as the product name and the reference next to it. --- templates/customer/_partials/order-detail-no-return.tpl | 2 ++ .../_partials/order-detail-product-line-no-return-mobile.tpl | 1 + .../customer/_partials/order-detail-product-line-no-return.tpl | 1 + .../_partials/order-detail-product-line-return-mobile.tpl | 1 + .../customer/_partials/order-detail-product-line-return.tpl | 1 + templates/customer/_partials/order-detail-return.tpl | 2 ++ 6 files changed, 8 insertions(+) diff --git a/templates/customer/_partials/order-detail-no-return.tpl b/templates/customer/_partials/order-detail-no-return.tpl index 4bed8d04..092ea7d0 100644 --- a/templates/customer/_partials/order-detail-no-return.tpl +++ b/templates/customer/_partials/order-detail-no-return.tpl @@ -91,6 +91,7 @@ {/foreach} {/if} + {hook h='displayOrderDetailProductLine' id_order=$product.id_order id_order_detail=$product.id_order_detail id_product=$product.id_product} {$product.quantity} @@ -137,6 +138,7 @@ {/foreach} {/if} + {hook h='displayOrderDetailProductLine' id_order=$product.id_order id_order_detail=$product.id_order_detail id_product=$product.id_product}
diff --git a/templates/customer/_partials/order-detail-product-line-no-return-mobile.tpl b/templates/customer/_partials/order-detail-product-line-no-return-mobile.tpl index 05904a2b..fc136278 100644 --- a/templates/customer/_partials/order-detail-product-line-no-return-mobile.tpl +++ b/templates/customer/_partials/order-detail-product-line-no-return-mobile.tpl @@ -24,6 +24,7 @@
{/foreach} {/if} + {hook h='displayOrderDetailProductLine' id_order=$product.id_order id_order_detail=$product.id_order_detail id_product=$product.id_product}
diff --git a/templates/customer/_partials/order-detail-product-line-no-return.tpl b/templates/customer/_partials/order-detail-product-line-no-return.tpl index 37a70579..fa6e400b 100644 --- a/templates/customer/_partials/order-detail-product-line-no-return.tpl +++ b/templates/customer/_partials/order-detail-product-line-no-return.tpl @@ -59,6 +59,7 @@
{/foreach} {/if} + {hook h='displayOrderDetailProductLine' id_order=$product.id_order id_order_detail=$product.id_order_detail id_product=$product.id_product} {$product.quantity} diff --git a/templates/customer/_partials/order-detail-product-line-return-mobile.tpl b/templates/customer/_partials/order-detail-product-line-return-mobile.tpl index 1a4b546e..2819c299 100644 --- a/templates/customer/_partials/order-detail-product-line-return-mobile.tpl +++ b/templates/customer/_partials/order-detail-product-line-return-mobile.tpl @@ -29,6 +29,7 @@
{/foreach} {/if} + {hook h='displayOrderDetailProductLine' id_order=$product.id_order id_order_detail=$product.id_order_detail id_product=$product.id_product}
diff --git a/templates/customer/_partials/order-detail-product-line-return.tpl b/templates/customer/_partials/order-detail-product-line-return.tpl index b6413d22..dc9d28c9 100644 --- a/templates/customer/_partials/order-detail-product-line-return.tpl +++ b/templates/customer/_partials/order-detail-product-line-return.tpl @@ -62,6 +62,7 @@
{/foreach} {/if} + {hook h='displayOrderDetailProductLine' id_order=$product.id_order id_order_detail=$product.id_order_detail id_product=$product.id_product}
diff --git a/templates/customer/_partials/order-detail-return.tpl b/templates/customer/_partials/order-detail-return.tpl index c0d5a33d..922eef7e 100644 --- a/templates/customer/_partials/order-detail-return.tpl +++ b/templates/customer/_partials/order-detail-return.tpl @@ -98,6 +98,7 @@
{/foreach} {/if} + {hook h='displayOrderDetailProductLine' id_order=$product.id_order id_order_detail=$product.id_order_detail id_product=$product.id_product}
@@ -167,6 +168,7 @@
{/foreach} {/if} + {hook h='displayOrderDetailProductLine' id_order=$product.id_order id_order_detail=$product.id_order_detail id_product=$product.id_product}