what is the wrong in code?

Hamdan Shafiq
Hamdan Shafiq used Ask the Experts™
on
<file path="catalog/view/theme/*/template/checkout/payment_method.twig">
<operation>
<search><![CDATA[{% for payment_method in payment_methods %}]]></search>
<add position="after"><![CDATA[
{% if payment_method.code == cod %}
{% set  cost= '-'.cod_fee_fee %}
{% endif %}
]]></add>
</operation>
</file>
<file path="catalog/view/theme/*/template/checkout/payment_method.twig">
<operation>
<search><![CDATA[{{ payment_method.title }}]]></search>
<add position="replace"><![CDATA[ {{ payment_method.title }}{{ cost }}]]></add>
</operation>
</file>
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Distinguished Expert 2017
Commented:
Try this:
<file path="catalog/view/theme/*/template/checkout/payment_method.twig">
<operation>
<search><![CDATA[{% for payment_method in payment_methods %}]]></search>
<add position="after"><![CDATA[
{% if payment_method.code == cod %}
{% set  cost= '-'.cod_fee_fee %}
{% endif %}
]]></add>
</operation>

<file path="catalog/view/theme/*/template/checkout/payment_method.twig">
<operation>
<search><![CDATA[{{ payment_method.title }}]]></search>
<add position="replace"><![CDATA[ {{ payment_method.title }}{{ cost }}]]></add>
</operation>
</file>
</file>

Open in new window

As i validate your code i had this error:
The markup in the document following the root element must be well-formed

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial