5

I want to add script using ocmode in opencart 2.0.3.1.

<?xml version="1.0" encoding="utf-8"?>
<modification>
  <name>Save and Continue Button in Settings-Category-Product-All   Module</name>
<code>save_continue</code>
<version>2.0.3.1</version>
<author>CBA</author>
<link>http://example.com</link>
<file path="admin/view/template/module/account.tpl">
<operation>
    <search index='1' trim='true'><![CDATA[
        </form>
    ]]></search>
    <add position="after" trim="true"><![CDATA[         
        <script>var user_id = $('form').attr('id');
            $('[type="submit"]').attr('form',user_id);
            $('.fa-reply').after('<button type="button" data-toggle="tooltip" title="Save and Continue" class="btn btn-default" onclick="$(my_id).attr('action', '<?php echo $action; ?>&save_continue=1').submit()"><i class="fa fa-repeat"></i></button>');
        </script>
    ]]></add>
</operation>

Now I save this file as test.ocmode.xml and upload from Extension Installer. but not works

HDP
  • 3,003
  • 2
  • 28
  • 50
CBA
  • 194
  • 13

1 Answers1

0

You have to create ocmod xml file with ".ocmod.xml" extension, then you can upload that file using "Extension Installer" from admin panel of opencart.

You have to clear and refresh the modification cache to update the system and make the extension work. You can clear and refresh by top right buttons on Extension > Modification page in admin panel. then check it.

HDP
  • 3,003
  • 2
  • 28
  • 50