"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.
For example instead to change the template's header file catalog/view/theme/default/template/common/header.tpl,
it's much more safer to create script that will do the change.
The main benefit of using vQmod is that you can safely update opencart and you don't need to worry about all HTML/PHP patches and hacks that you have done on it. They are safely stored as xml scripts in /vqmod/xml folder. If there is any difference in the new OpenCart version you just have to set correct searching and replacing string in the xml script and it will work the same as before.
How to install using Autoinstaller - (Didn't work for me)
- Download the latest version that has "opencart" in the title from
- Using FTP, upload the "vqmod" folder from the zip to the root of your opencart store.
- Be sure the vqmod folder and the vqmod/vqcache folders are writable (either 755 or 777).
- Also be sure index.php and admin/index.php are writable.
- If not sure which you need, first try 755.
- If you get errors about permissions, then try 777.
- Goto http://www.yoursite.com/vqmod/install
- You should get a success message. If not, check permissions above and try again
- Load your store homepage and verify it works.
- Using FTP, verify that there are new "vq" files in the "vqmod/vqcache" folder.
- If yes, then you are ready to start downloading or creating vQmod scripts, otherwise ask for assistance.
Done!
Well NOT DONE.
This method didn't work for me, I deleted .htaccess file in the vqmod folder, but still wasn't able to access http://www.yoursite.com/vqmod/install. The browser kept saying Internal server error.
How to install Manually - (worked for me)
Backup your main site / index.php and admin/index.php before continue.
- Download the latest version that has "opencart" in the title from
- Using FTP, upload the "vqmod" folder from the zip to the root of your opencart store.
- Be sure the vqmod folder and the vqmod/vqcache folders are writable (either 755 or 777).
- Also be sure index.php and admin/index.php are writable.
- If not sure which you need, first try 755.
- If you get errors about permissions, then try 777.
- Edit your index.php file
- FIND:
- REPLACE WITH:
// Startup require_once(DIR_SYSTEM . 'startup.php'); // Application Classes require_once(DIR_SYSTEM . 'library/customer.php'); require_once(DIR_SYSTEM . 'library/currency.php'); require_once(DIR_SYSTEM . 'library/tax.php'); require_once(DIR_SYSTEM . 'library/weight.php'); require_once(DIR_SYSTEM . 'library/length.php'); require_once(DIR_SYSTEM . 'library/cart.php'); require_once(DIR_SYSTEM . 'library/affiliate.php');
// vQmod require_once('./vqmod/vqmod.php'); $vqmod = new VQMod(); // VQMODDED Startup require_once($vqmod->modCheck(DIR_SYSTEM . 'startup.php')); // Application Classes require_once($vqmod->modCheck(DIR_SYSTEM . 'library/customer.php')); require_once($vqmod->modCheck(DIR_SYSTEM . 'library/currency.php')); require_once($vqmod->modCheck(DIR_SYSTEM . 'library/tax.php')); require_once($vqmod->modCheck(DIR_SYSTEM . 'library/weight.php')); require_once($vqmod->modCheck(DIR_SYSTEM . 'library/length.php')); require_once($vqmod->modCheck(DIR_SYSTEM . 'library/cart.php')); require_once($vqmod->modCheck(DIR_SYSTEM . 'library/affiliate.php'));
Note the affiliate library file may not exist on older systems. Basically any require_once(DIR_SYSTEM . 'library/xxxxxxxx.php');needs to be changed to use the vqmod->modCheck above in the same format. This also applies to any additional require_once files in the next step
- Edit your admin/index.php file
- FIND:
- REPLACE WITH:
- Load your store homepage and verify it works.
- Using FTP, verify that there are new "vq" files in the "vqmod/vqcache" folder.
- If yes, then you are ready to start downloading or creating vQmod scripts.
// Startup require_once(DIR_SYSTEM . 'startup.php'); // Application Classes require_once(DIR_SYSTEM . 'library/currency.php'); require_once(DIR_SYSTEM . 'library/user.php')); require_once(DIR_SYSTEM . 'library/weight.php'); require_once(DIR_SYSTEM . 'library/length.php');
// vQmod require_once('../vqmod/vqmod.php'); $vqmod = new VQMod(); // VQMODDED Startup require_once($vqmod->modCheck(DIR_SYSTEM . 'startup.php')); // Application Classes require_once($vqmod->modCheck(DIR_SYSTEM . 'library/currency.php')); require_once($vqmod->modCheck(DIR_SYSTEM . 'library/user.php')); require_once($vqmod->modCheck(DIR_SYSTEM . 'library/weight.php')); require_once($vqmod->modCheck(DIR_SYSTEM . 'library/length.php'));
Done!
This method worked. The only warning to this method is that every time u upgrade your opencart you have to modify manually these 2 index.php files.
The next post I will publish some useful vQMod scripts