2013年5月31日 星期五

Install vQmod on OpenCart

"vQmod™" (aka Virtual Quick Mod) is an override system designed to avoid having to change core files. The concept is quite simple... Instead of making changes to the core files directly, the changes are created as xml search/replace script files. These script files are parsed during page load as each "source" core file is loaded with the "include" or "require" php functions. The source is then patched with the script file changes, and saved to a temp file. That temp file is then substituted for the original during execution. The original source file is never altered. This results in a "virtual" change to the core during execution without any actual modification to the core files. (from vQmod)

0. Backup your website.

1. Install vQmod:
1.1 Download vQmod.
1.2 Follow instruction of Install_OpenCart.
ps. You may need to modify "vqmod/install/index.php" and "pathReplaces.php" files if you've changed your admin folder name.

2. Install VQMod Manager:
2.1 Download VQMod Manager.
2.2 Follow instruction of README.pdf.

Example for using:
1. New a xml file as vqmod_modifycopyright.xml .
2. Copy these codes to vqmod_modifycopyright.xml .
<modification>
<id>Modify copyright</id>
<version>1.0</version>
<vqmver>2.0</vqmver>
<author>author</author>
<file name="catalog/controller/common/footer.php">
<operation>
<search position="after"><![CDATA[$this->data['powered']]]></search>
<add><![CDATA[$this->data['powered'] = 'Your company &copy; ' . date('Y') . '<br />';]]></add>
</operation>
</file>
</modification>


3. Upload vqmod_modifycopyright.xml. [Extensions] --> [Modules] --> [VQMod Manager]

沒有留言:

張貼留言