They certainly work for me. Even in the vqmod_opencart.xml file I have things like <!-- 2 matches --> which work fine.Johnathan wrote:Just wanted to point out that inline comments (like <!-- This is a comment -->) don't work. This isn't vital, but would be nice to have for multiple-modification files. My work-around was to put <title>Example Title</title> before the <file> tag, which seems to parse fine.
Almost of all my vQmod scripts I make have comment tags in them.
Just remember the rules of xml/html.. no nested comments:
Code: Select all
<!--
<file>
<!-- 2 matches -->
</file>
-->
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
Huh...that's weird. I swear they were causing the file to not work earlier, but I can't reproduce it now. I must be going crazy.Qphoria wrote:They certainly work for me. Even in the vqmod_opencart.xml file I have things like <!-- 2 matches --> which work fine.
Almost of all my vQmod scripts I make have comment tags in them.
Just remember the rules of xml/html.. no nested comments:
will not work. Kind of a major fail by the xml/html spec creatorsCode: Select all
<!-- <file> <!-- 2 matches --> </file> -->
Replace:
Code: Select all
// Startup
require_once(DIR_SYSTEM . 'startup.php');
Code: Select all
//VirtualQMOD
require_once('../vqmod/vqmod.php');
$vqmod = new VQMod();
// Startup
require_once($vqmod->modCheck(DIR_SYSTEM . 'startup.php'));
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
We have a new "vQmod" section in the Free Modifications subforum for vQmod scripts:
http://forum.opencart.com/viewforum.php?f=23
This should make it easier to browse all the available free vQmod scripts available
Turns out I'm not crazy. My computer was trying to sabotage me, that's all. I had a system-wide auto-correct to replace -- with — and it was doing it on the sly after I'd add the closing comment tag. Since it was a mono-space font, though, if I fixed it by adding a second hyphen again, it still wouldn't work because the first was actually an m-dash masquerading as a hyphen.Johnathan wrote:Huh...that's weird. I swear they were causing the file to not work earlier, but I can't reproduce it now. I must be going crazy.
Wow, what a saga, and one that I'm sure you all cared to know about.

To be honest that threw me the first time too. You pretty much expect install instructions to be first and upgrade instructions below them.Qphoria wrote:Perhaps you should read down further in that documentDigital Sushi wrote:Maybe I'm being silly but how in the world do I install this and make sure it's working? The readme in the .zip file only states about upgrading from an older version.
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
Lady pantsQphoria wrote:Premadonnas

But at any rate I got it working. Thanks!
When using systems that have plesk installed, some of them have multiple paths to the files. This causes an issue when it comes time to match them up and thus fails to make any mods whatsoever. Example: I had a client who's files were coming up as
/var/www/vhosts/domain.com/httpdocs/
for the root folder for source files using $_SERVER['SCRIPT_FILENAME']
when in fact it was
/home/vhosts/domain.com/httpdocs/
Easily fixed of course using a str_replace, but better to get it fixed for all other server configs etc
FIX:
Open /vqmod/vqmod.php
Find
Code: Select all
$sourcefile = str_replace("\\", "/", str_replace('./', dirname($_SERVER['SCRIPT_FILENAME']) . '/', $sourcefile));
Code: Select all
$sourcefile = realpath(str_replace("\\", "/", str_replace('./', dirname($_SERVER['SCRIPT_FILENAME']) . '/', $sourcefile)));

Specifically on my system the display of the lines in notepad shows as 1 long string, but in other editors it shows as properly formatted text.
Notepad is the default editor in my filezilla ftp.
I can get notepad to show properly by pasting the info in another editor, copying it back to notepad and then it shows properly. I am thinking its because of how notepad handles the cr/lf characters.
Am I breaking how vQmod works if I do that? I have been looking thru some of the xml docs that vqmod uses to see if I could answer the question myself, but I do not see any multiple line search/replace operations in the ones I look at.
The problem with cr/lf is definitely a PITA.. so that is why I do it a bit differently.ocnewby wrote:How does vQmod handle searches that span multiple lines?
See here:
http://forum.opencart.com/viewtopic.php ... 60#p129979
Thanks for the info. I've actually changed a lot of path stuff in the upcoming 1.0.9 and that line actually doesn't exist any longer, so I may need you to test this again with the new version to see if I may have inherently fixed it as I do have realpath in place now for the main path, but it may need to be addressed again.JAY6390 wrote: FIX:
Open /vqmod/vqmod.php
FindReplace withCode: Select all
$sourcefile = str_replace("\\", "/", str_replace('./', dirname($_SERVER['SCRIPT_FILENAME']) . '/', $sourcefile));
And it worksCode: Select all
$sourcefile = realpath(str_replace("\\", "/", str_replace('./', dirname($_SERVER['SCRIPT_FILENAME']) . '/', $sourcefile)));
I looked at the link you posted and it shows how to replace a block of code, but not how to search for and positively identify it.The problem with cr/lf is definitely a PITA.. so that is why I do it a bit differently.
It appears that in vQmod one needs to specify a specific occurrence of a shorter piece of code and then replace a block of text rather than positively identifying the actual code in the middle
My post actually had several related issues.
1. How to search for text using vQmod that spans multiple lines of code.
2. What is the difference when text is displayed in a long concatenated string or formatted/indented like a programmer editor. eg: basic windows notepad VS Notepad2
3. Am I changing the code text if I copy the long concatenated string into notepad 2, and then paste it back to notepad for re-upload to the server?
4. If I am changing the actual code text in statement 3., then would I be breaking my vQmod operation by doing that?
Maybe a future revision of vQmod could specify a search that specified a start text, and an end text and that would more positively identify a section of code? Actually as I type this that sounds like a good way to bypass cr/lf issues.
That kind of mod is WAYYYY beyond what I know, but you are obviously a guru.
Thanks in advance.

This fix may only apply to "virtual" servers. I applied this in my own development setup (XAMPP & Windows) and found that it prevented the VirtualQmod system from working altogether.JAY6390 wrote: FIX:
Open /vqmod/vqmod.php
FindReplace withCode: Select all
$sourcefile = str_replace("\\", "/", str_replace('./', dirname($_SERVER['SCRIPT_FILENAME']) . '/', $sourcefile));
And it worksCode: Select all
$sourcefile = realpath(str_replace("\\", "/", str_replace('./', dirname($_SERVER['SCRIPT_FILENAME']) . '/', $sourcefile)));
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
you can'tocnewby wrote: 1. How to search for text using vQmod that spans multiple lines of code.
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
Users browsing this forum: No registered users and 4 guests