Home > php教程 > php手册 > OpenCart How to Install vQmod Tutorial

OpenCart How to Install vQmod Tutorial

WBOY
Release: 2016-11-16 10:24:02
Original
1906 people have browsed it

vQmod (full name: Virtual Quick Mod) is a plug-in system designed on OpenCart (PHP open source e-commerce website system) that can modify the content of the original file in a virtual way. Its use is very simple. We first use xml to write the lines of code to be searched and the new codes to be replaced. Then vQmod will dynamically code the original files corresponding to the system according to these rules and save them as cache files. The system will then execute these cached files instead of the original original files. The advantage of this is that we don't have to make changes directly to the original code. In this way, when we upgrade the OpenCart version later, we don't need to modify the original file again.

Why do we need vQmod?

We know that open source systems are a continuous upgrade process. OpenCart is developing very fast, and new versions will appear from time to time. I believe that most OpenCart users need to make some customizations to the original system files. Inevitably some php and tpl files need to be modified. Without a virtual modification system, all our modifications to the original files will be lost after we upgrade or reinstall OpenCart, and then we will need to modify the original modifications again on the new version. This has become a flaw.

For third-party plug-in developers, without vQmod, the plug-in will not be able to dynamically modify the original file. The content must be modified manually, which makes the development and installation of plug-ins very inconvenient. There is no doubt that vQmod is responsible for OpenCart’s success. The emergence of vQmod makes secondary development of plug-in development easy. Developers can develop plug-ins with various functions. Users can also easily install and upgrade these plug-ins.

vQmod Features

  • Do not directly change the source file content. All modifications are "virtual", just like the Virtual in the name of vQmod;
  • The source file is dynamically modified when executed, and a new cache file is generated using the original file name;
  • Put xml under vqmod/xml to take effect, and remove the file to restore the original file;
  • Don’t worry about losing customized code after upgrading system source files;
  • Easy to install and write xml rules easy to learn;
  • Multiple modification methods such as payment replacement, front insertion, back insertion, inline replacement, etc.;
  • Supports searching and replacing content using regular expressions;
  • Support search and replace offset;

I believe everyone already has an understanding of the use of vQmod. Let me share with you how we should install vQmod?

vQmod supports OpenCart 1.4.x, OpenCart 1.5.x and OpenCart 2.x

Automatically install vQmod

  1. First download the vQmod installation package. It should be noted that vQmod not only supports OpenCart, when downloading, please download the OpenCart-specific version (Github download) or domestic mirror download;
  2. Extract the downloaded zip installation package, and then use the FTP tool to upload the vqmod folder to the root directory of the OpenCart website;
  3. Modify permissions. It is necessary to modify the vqmod folder and vqmod/vqcache folder to have 755 or 777 permissions; at the same time, the config.php and admin/config.php in the root directory must also have 755 or 777 permissions (try 755 first, and if it does not work, change it to 777).
  4. Then directly access vqmod/install in the browser to perform the installation (http://www.xxx.com/vqmod/install);
  5. If the installation is successful, you can see the success message. If it fails, go back to step 3 to modify the permissions and repeat step 4 of the installation;

If the installation is successful, you will see a newly generated file under vqmod/vqcache. At this point you can upload your xml file, and then browse the website to see if there are cache files generated under vqcache (all caches generated by vQmod will be saved in the vqmod/vqcache directory).

It should be noted that there is no danger in accessing vqmod/install multiple times. If the installation fails, you can safely access the files and folders multiple times after modifying the permissions. And do not delete the install directory.

Okay, now vQmod is installed. Isn’t it very simple?

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template