Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Config/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<language>en_US</language>
<language>fr_FR</language>
</languages>
<version>1.0.1</version>
<version>1.0.2</version>
<authors>
<author>
<name>Bertrand Tourlonias</name>
Expand Down
11 changes: 8 additions & 3 deletions Hook/Back/OrderProductHook.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,21 @@ public function onOrderEditProductList(HookRenderEvent $event): void

$orderProductOption = OptionCartItemOrderProductQuery::create()
->filterByOrderProductId($orderProductId)
->findOne();
->find();

if (null === $orderProductOption) {
return;
}

$data = [];
foreach ($orderProductOption as $option) {
$data[] = json_decode($option->getCustomizationData(), true, 512, JSON_THROW_ON_ERROR);
}

$event->add(
$this->render('order-product/order_product_additional_data.html', [
"orderProductCustomization" => json_decode($orderProductOption?->getCustomizationData(), true, 512, JSON_THROW_ON_ERROR)
"orderProductCustomization" => $data
])
);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
<pre>
{$orderProductCustomization|@var_dump}
</pre>
{if $orderProductCustomization|count > 0}
<dl class="dl-horizontal">
<dt>Options</dt>
<dd>
{foreach from=$orderProductCustomization item=option}
<div>{' - '|implode:$option}</div>
{/foreach}
</dd>
</dl>
{/if}