Note
Please try to follow the rules outlined below. We believe that it would make CS-Cart and Multi-Vendor more convenient to use and upgrade.
CS-Cart and Multi-Vendor are open source software. It means that after you download CS-Cart and unpack the archive, you can open any file and see its inner workings. All the files that come with CS-Cart or Multi-Vendor by default are called core files.
Since the source code is open, you could make the system better suit your needs by modifying the core files... but you shouldn’t. Instead we suggest making changes indirectly (for example, as separate add-ons).
Important
This rule has some exceptions, even though they are few. For example, we do advise renaming admin.php for security reasons right after you install CS-Cart or Multi-Vendor.
Note
Short answer: Changing core files can result in issues with add-on compatibility. You can also lose your changes or have them cause a bug after an upgrade. Reverting the changes may get just as complicated as making them.
If you decide to upgrade a store with a modified core file to a new version of CS-Cart/Multi-Vendor, here’s what might happen during the upgrade:
Things can get problematic even without an upgrade. Let’s assume that you have a modified core file, and a third-party add-on doesn’t work properly, although it should work on your version of CS-Cart.
Normally, the first suggestion is to disable other add-ons to make sure that the problem isn’t caused by them. But if you applied some modifications directly to core files, you’d have to revert them too, just to be sure. This can become a hassle, especially if some pieces of the default code were removed or replaced.
In CS-Cart & Multi-Vendor 4.4.1 we introduced the File Changes Detector. It monitors changes in core files and notifies you about them. When you open the Administration panel of your store, you can check if any of your core files was modified:
You can also configure your store to automatically check for modified core files every time you log in to the Administration panel. To do that:
Now, if any core file differs from the default file, the following notification will appear when you open the Administration panel:
Important
Some of your core files were changed manually. That can lead to various problems, especially when upgrading to a new version of CS-Cart.
CS-Cart and Multi-Vendor offer ways to make changes without modifying the core files:
If you need to add or change functionality, you can implement it as a separate add-on. When you create an add-on, you can use hooks to add or modify the code in the core files indirectly. Here are the benefits of this approach:
Important
You can request new hooks for future versions of CS-Cart here. Please check our rules of hook creation first—we may adjust your suggested hook to meet those requirements.
If you need to change the look of the store, don’t modify the default Responsive theme. Instead you can create a separate theme. The easiest way to do it is by cloning your current active theme. You can do it right in the Administration panel:
Starting with CS-Cart 4.4.1, a cloned theme only includes the manifest.json file, logos, and the default style. The rest of the data is automatically taken from the theme specified in manifest.json as parent_theme
:
To make any changes, just copy the corresponding files from the parent theme to the clone theme and edit those files there.
Note
Learn more about the logic of theme functioning in CS-Cart 4.4.1 from this forum post.
Questions & Feedback
Have any questions that weren't answered here? Need help with solving a problem in your online store? Want to report a bug in our software? Find out how to contact us.