vQmod installation in Opencart

Interestingly, vQmod was originally developed for Open Cart! But due to “openness” of the design, it has been used by other systems too.

In OpenCart (OC), extending your site’s features usually results in modifying the program core codes. There are many reasons why this practice is not favorable – a major one is that it is not easily reversible. Say when you modified some codes and wanted to reinstate the original for some reason, it can be quite tedious.

This is due to the nature of how OC handles extensions. Its normally done by overwriting existing codes instead of using plugin or module concepts employed in WordPress or Drupal. Honestly, this has been one of my top gripes about OC.

Installing on OpenCart

vQmod works on both OpenCart 1.4.x and 1.5.x


How to install using Autoinstaller

  1. Download the latest version that has “opencart” in the title from
  2. Using FTP, upload the “vqmod” folder from the zip to the root of your opencart store.
  3. 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.
  4. Goto http://www.yoursite.com/vqmod/install
  5. You should get a success message. If not, check permissions above and try again
  6. Load your store homepage and verify it works.
  7. Using FTP, verify that there are new “vq” files in the “vqmod/vqcache” folder.
  8. If yes, then you are ready to start downloading or creating vQmod scripts, otherwise ask for assistance.

Done!

 

Here is the video for assist.

 

How to install Manually

  1. Download the latest version that has “opencart” in the title from
  2. Using FTP, upload the “vqmod” folder from the zip to the root of your opencart store.
  3. 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.
  4. Edit your index.php file
  5. FIND:
    // 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');
  • REPLACE WITH:
    // 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:
    // 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');
  • REPLACE WITH:
    // 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'));
  • 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.
  • Done!For managing vqmod from admin panel in opencart, you can download the following extension.http://www.opencart.com/index.php?route=extension/extension/info&extension_id=2969&filter_username=rph
SHARE vQmod installation in Opencart

You may also like...

1 Response

  1. Wonderful Design Blogs, Such a great list. Thanks for sharing all these blogs all are very useful to every one.
    opencart development and opencart developer

Leave a Reply

Your email address will not be published.

Share