How to add a script using OCmode in Opencart 2.0.3.1

I want to add a 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 boot from the Extension Installer. but does not work

+5
source share
1 answer

You need to create an xml ocmod file with the extension ".ocm.xml", then you can download this file using the "Extension Installer" from the opencart admin panel.

You must clear and update the modification cache in order to update the system and make the extension work. You can clear and update the upper right buttons on the "Extension"> "Edit" page in the admin panel. then check it out.

0
source

All Articles