Skip to content

Instantly share code, notes, and snippets.

@valdeir2000
Created November 3, 2020 01:09
Show Gist options
  • Save valdeir2000/cdfdf820cabbff9c04c284102b65764a to your computer and use it in GitHub Desktop.
Save valdeir2000/cdfdf820cabbff9c04c284102b65764a to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<modification>
<name>PagSeguro Checkout Transparente</name>
<code>valdeir_pagseguro_checkout_transparente</code>
<version>2.0.1</version>
<author>Valdeir S.</author>
<link>https://valdeir.dev</link>
<file path="catalog/view/theme/*/template/account/order_info.twig">
<operation>
<search>
<![CDATA[{{ continue }}]]>
</search>
<add position="before">
<![CDATA[
{% if boleto %}
<div class="pull-left"><a href="{{ boleto }}" class="btn btn-primary" target="_blank">2ª via do boleto</a></div>
{% endif %}
]]>
</add>
</operation>
</file>
<file path="admin/view/template/sale/order_info.twig">
<operation>
<search>
<![CDATA[<h3 class="panel-title"><i class="fa fa-comment-o"></i> {{ text_history }}</h3>]]>
</search>
<add position="before" offset="2">
<![CDATA[
{{ pagseguro }}
]]>
</add>
</operation>
</file>
<file path="system/library/template/twig.php">
<operation>
<search>
<![CDATA[$file = DIR_TEMPLATE . $filename . '.twig';]]>
</search>
<add position="after">
<![CDATA[
if (version_compare(VERSION, '3.0.3.6', '==')) {
$file_ocmod = DIR_MODIFICATION . $filename . '.twig';
$application_folder = basename(DIR_APPLICATION);
$folder_ocmod_template = str_replace(DIR_APPLICATION, $application_folder . '/', DIR_TEMPLATE);
$file_ocmod = DIR_MODIFICATION . $folder_ocmod_template . $filename . '.twig';
if (is_file($file_ocmod)) {
$file = $file_ocmod;
}
}
]]>
</add>
</operation>
</file>
</modification>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment