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.
- Select Text from GitHub:
- Highlight code or file paths on GitHub and add them to your OCMOD template using the popup buttons.
- Find & Replace:
- Add selected text to the "Find" and "Replace" fields for OCMOD operations.
- File Path Selection:
- Copy the file path from GitHub and set it in the extension using the clipboard.
- One-Click XML Generation:
- Generate OCMOD
<operation>
XML blocks forafter
,replace
, orbefore
positions. - Generate a
<file>
block with your selected values.
- Generate OCMOD
- OCMOD Boilerplate:
- Copy a ready-to-use OCMOD XML template with a single click.
- Clipboard Integration:
- All generated XML snippets are automatically copied to your clipboard for easy use.
- Install the Extension:
- Load the extension in Chrome via
chrome://extensions
(enable Developer Mode and "Load unpacked").
- Load the extension in Chrome via
- Navigate to a GitHub Commit or PR:
- Go to the file or code you want to modify.
- Select Text:
- Highlight the code you want to use for "Find" or "Replace" and click the corresponding button in the extension popup.
- Set File Path:
- Copy the file path from GitHub, then click "Set File" in the popup to paste it from your clipboard.
- 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.
- Paste and Use:
- Paste the generated XML into your OCMOD modification file for OpenCart.
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 || [email protected]</author>
<link>https://iextendlabs.com</link>
</modification>
- Built with vanilla JavaScript, HTML, and CSS.
- Uses the Chrome Extensions API for clipboard and storage access.
Developed by Saqib Ashraf
iextendlabs.com