i am programming an extension for OC4 and i am trying to change the product title in thumb.twig by trigger.
What i have so far is:
admin/controller/module
Code: Select all
'trigger' => 'catalog/view/product/thumb/after',
view/template/module
Code: Select all
public function somefunction(string &$route, array &$data, mixed &$output): void {
$output = str_replace('</a></h4>', '</a><br/><b>Product ID: {{ product_id }}</h4>', $output);
}
}
But something does not fit here, because in the thumb.twig (Product Category Page) i did not see the product_id. It only shows "{{ product_id }}" as plain text.
Can you please help me how to get the product_id here?
Best,
Jack