As I'm running a couple of OCMOD experiments, somehow none of my changes will actually show up. Yes I refreshed all my caches, the modification simply isn't working. I'm using a default, fresh installation of OpenCart and nothing has been modified inside the TWIG files. When I search for the code directly into the TWIG file, opened in my code editor, I can find it. But OCMOD apparently does not find it, even though I copied the exact code. I created this XML template myself.
Is this the correct way of doing it, or does it require a specific order?
Does OCMOD not recognize TWIG in the code, or what is it?
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<modification>
<name>Extension Name</name>
<version>1.0</version>
<author>Author</author>
<link>https://www.example.com/</link>
<code>code</code>
<description>Description</description>
<file path="admin/view/template/catalog/product_list.twig">
<operation>
<search>
<![CDATA[<td class="text-right">{% if product.special %} <span style="text-decoration: line-through;">{{ product.price }}</span><br/>
<div class="text-danger">{{ product.special }}</div>
{% else %}
{{ product.price }}
{% endif %}</td>]]>
</search>
<add position="before">
<![CDATA[<td class="text-right">Buy Price</td>]]>
</add>
</operation>
</file>
</modification>
Is this still a thing in 3.0.3.8 or was it fixed?
What else could be wrong here?
This is the log message:
Code: Select all
MOD: Extension Name
FILE: admin/view/template/catalog/product_list.twig
CODE: <td class="text-right">{% if product.special %} <span style="text-decoration: line-through;">{{ product.price }}</span><br/>
<div class="text-danger">{{ product.special }}</div>
{% else %}
{{ product.price }}
{% endif %}</td>
NOT FOUND - OPERATIONS ABORTED!