Opencart-XML-Generator-Chrome-Extension

OCMOD Generator Chrome Extension

OCMOD Generator is a Chrome extension that helps OpenCart developers quickly build OCMOD XML files directly from GitHub commit or pull request pages. With a simple popup interface, you can select file paths, code to find, replacement code, and generate OCMOD XML snippets or boilerplate templates with a single click.

Features

How to Use

  1. Install the Extension:
    • Load the extension in Chrome via chrome://extensions (enable Developer Mode and “Load unpacked”).
  2. Navigate to a GitHub Commit or PR:
    • Go to the file or code you want to modify.
  3. Select Text:
    • Highlight the code you want to use for “Find” or “Replace” and click the corresponding button in the extension popup.
  4. Set File Path:
    • Copy the file path from GitHub, then click “Set File” in the popup to paste it from your clipboard.
  5. Generate XML:
    • Use the “Operation After”, “Operation Replace”, or “Operation Before” buttons to generate the corresponding OCMOD XML operation.
    • Use “File xml” to generate a <file> block with your selected values.
    • Use “OCMOD Template” to copy a boilerplate OCMOD XML template.
  6. Paste and Use:
    • Paste the generated XML into your OCMOD modification file for OpenCart.

Example Output

OCMOD Operation Example:

<operation>
    <search><![CDATA[
        // your find code here
     ]]></search>
    <add position="after"><![CDATA[
        // your replace code here
    ]]></add>
</operation>

OCMOD Boilerplate Example:

<?xml version="1.0" encoding="utf-8"?>
<modification>
    <code></code>
    <name> by iextendlabs.com</name>
    <version></version>
    <author>Saqib Ashraf || support@iextendlabs.com</author>
    <link>https://iextendlabs.com</link>
</modification>

Development

Credits

Developed by Saqib Ashraf
iextendlabs.com