I'm trying to edit the header.tpl of an opencart website that uses vqmod - I need to add some more info (text) to each menu link, so basically edit the header file.
I've looked into the vqmod manager and files but I can't seem to get it right.
Unfortunately, whenever I try to edit the header file, the site breaks -I've tried editing the cached vqmod files as well, no luck with that.
Is there a way to reset the vqmod / disable it, then edit the header.tpl and enable vqmod again?
Do I need to install a new theme and start from scratch?
To Disable all vQmod's simply rename the files in /vqmod/xml/ so that their extensions becom .xml_ instead of .xml - Then delete all the files in the /vqmod/vqcache/ folder so that no cached files are used and it should work. That said, if you are wanting to add extra text to menu items, why not just edit the /admin/language/your-language/common/header.php file's text?
Related
I have a custom Opencart shipping extension. It has upload/ and install.xml. When I upload extension.ocmod.zip through extension installer, it completes installation. But the extension is not visible under Extensions > Shipping.
I checked the code and none of the files from the extension is present under upload/admin/controller/extension/shipping.
I have refreshed modifications and cache from the dashboard.
Make sure that your file extension.ocmod.zip contains:
the upload folder and install.xml file directly
and there is not another subdirectory contains them
Without knowing the OC version you're using, my guess is that your path structure should be:
install.xml
upload/admin/view/extension/shipping/*
upload/admin/model/extension/shipping/*
upload/admin/controller/extension/shipping/*
upload/admin/language/en-gb/extension/shipping/*
upload/catalog/view/theme/default/extension/shipping/*
upload/catalog/model/extension/shipping/*
upload/catalog/controller/extension/shipping/*
upload/catalog/language/en-gb/extension/shipping/*
I am confused that what is the difference between controllers modifications in the storage directory and the catalog directory.
Editions in extensions don't affect pages in catalog controllers.
Can you enlight me?
When you see a core file in storage/modification folder, it means that you have an OCMod file that needs to edit that core file. for example:
Core File (OpenCart original file):
catalog/controller/product/product.php
Modification File (copy of original file with some edits altered by OCMod):
storage/modification/catalog/controller/product/product.php
Go to admin panel / Extensions / Modifications, you should see a list of installed OCMod files. also you can see a Refresh button on top of this page, if you hit this button all files in storage/modification folder will be deleted And if necessary, it will be rebuilt.
Read more about modification system:
https://github.com/opencart/opencart/wiki/Modification-System
I'm editing a repository that doesn't use Prettier, but my editor (Emacs) loads prettier-js-mode based on file extension. So when saving a file I get a bunch of whitespace changes that I can't commit as it would polute the upstream repository.
My idea so far is to add a local .prettierrc file that disables Prettier, then add it to my .git/config/exclude file so upstream doesn't have to know about it.
But how do I craft such a file?
In my case I'd like to have a file in the project's root directory that would disable Prettier for the whole project, but I can also see how others might wish for a way to do the same thing for a subdirectory.
What about adding the .prettierignore with a * in it?
prettier-js-mode should have a config to only enable itself when it finds prettier config in the root or in package.json. The same as vscode and atom plugins do. If it doesn't have this feature it would be nice to open an issue or a PR.
The accepted answer is kinda hacky, but sure it will work too.
I am working on a small project and I have a file links to download from server. However, instead of downloading the file I want them open in fixed size pop up. I tried facebox but facebox(http://defunkt.io/facebox/) fail to display pdf files and other text files. any one have any idea what I suppose to do in order to accomplish this task.
Thanks you
Been fighting with Mercurial's .hgignore for a while under Windows.
I have a folder named Upload which is currently empty. I do want it tracked so I added a .empty file in it which work fine. I want this so that new developers doing an hg clone get the Upload document required for the application.
Thing is I never want the folder to be populated with anything on the source control itself (test uploads from a development machine).
Example:
If I add Public/image.jpg it wouldn't be tracked.
Additionally I would like it for sub directory to be tracked. So if developer adds
Upload/users/.empty I would like this to be tracked.
Is this possible with regex voodoo?
In mercurial (and unlike in svn and cvs) adding a file overrides the .hgignore file, so you can put this in your .hgignore:
^Uploads/.*
and your Upload/.empty that you added will still be created on update and thus they'll get the directory.
Getting it to ignore files in upload but not not ignore files in subdirectories in Upload could be done with:
^Uploads/[^/]*$
which says: ignore anything that Starts with Uploads and has no further slashes in it.
Really though, you should be creating Uploads with your build/install/configure script when possible, not with the clone/update.
Try putting
Uploads/(?!.empty)
in .hgignore in the root of the repository
Try
^Uploads\b.*/(?!\.empty)[^/]+$
This should match any path starting with Uploads where the text after the last slash (=filename) is anything but .empty.