Post by Qphoria » Tue Jun 21, 2011 1:37 am

I am using vqmod (JayG edition) on my site now. Working great

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by madimar » Tue Jun 21, 2011 4:19 pm

Just PMed to Jay with what seems a little bug. Let me know if you prefer to share bugs here in the forum or mantain it in PM.

Ciao

M

-----------------------------------------------------------------------
My last mods: Partita IVA e CF | Pro EU VAT Number | Sales Agents | Pricelist Pro
-----------------------------------------------------------------------


User avatar
Active Member

Posts

Joined
Thu Sep 24, 2009 6:27 pm


Post by JAY6390 » Tue Jun 21, 2011 6:02 pm

Hi Madimar. With this not yet being released, I think it best to just share bugs via PM, to save confusion with the 1.x version

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by Qphoria » Tue Jun 21, 2011 9:58 pm

I think on release of v2.0, we will open a new thread and lock this one to get a fresh start.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by madimar » Tue Jun 21, 2011 10:16 pm

Good idea Q! But I'm still experiencing an issue with 1.2.2 with index. I'm struggling to understand why but, following script doesn't work properly (with OC 1.4.9.5):

Code: Select all

<file name="admin/controller/sale/customer.php">
		<operation>
            <search position="before" index="1,2"><![CDATA[
			if (isset($this->request->get['filter_status'])) {
            ]]></search>
            <add><![CDATA[
// madimar mod
code
// madimar mod end
            ]]></add>
        </operation>	
</file>
The problem is it just hits the first occurence and not the second or others.

If I remove index clause, all the occurrences are correctly hit.

-----------------------------------------------------------------------
My last mods: Partita IVA e CF | Pro EU VAT Number | Sales Agents | Pricelist Pro
-----------------------------------------------------------------------


User avatar
Active Member

Posts

Joined
Thu Sep 24, 2009 6:27 pm


Post by JAY6390 » Tue Jun 21, 2011 10:28 pm

Just out of interest, does this work with the new one Madimar?

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by madimar » Tue Jun 21, 2011 10:41 pm

Working great, man!!!! With you last version (just download) obviously!
Last edited by madimar on Tue Jun 21, 2011 10:43 pm, edited 1 time in total.

-----------------------------------------------------------------------
My last mods: Partita IVA e CF | Pro EU VAT Number | Sales Agents | Pricelist Pro
-----------------------------------------------------------------------


User avatar
Active Member

Posts

Joined
Thu Sep 24, 2009 6:27 pm


Post by JAY6390 » Tue Jun 21, 2011 10:41 pm

Also, for your issue, try this...
FInd

Code: Select all

        $positions = array('before','after','replace','top','bottom','all'); 
and before it put

Code: Select all

        if($index && is_string($index)) {
            $index = explode(',', $index);
            if(!count($index))
            $index = false;
        } 

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by madimar » Tue Jun 21, 2011 10:51 pm

Hit and sunk! Ready for 1.2.3 vqmod!!!

-----------------------------------------------------------------------
My last mods: Partita IVA e CF | Pro EU VAT Number | Sales Agents | Pricelist Pro
-----------------------------------------------------------------------


User avatar
Active Member

Posts

Joined
Thu Sep 24, 2009 6:27 pm


Post by Qphoria » Wed Jun 22, 2011 4:46 am

ok v1.2.3 added to first post with JayG's fix for index (hopefully the last 1.x version)

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by madimar » Wed Jun 22, 2011 5:47 am

yeah, now 2.0 seems working fine. Continuing testing with my ongoing developments

-----------------------------------------------------------------------
My last mods: Partita IVA e CF | Pro EU VAT Number | Sales Agents | Pricelist Pro
-----------------------------------------------------------------------


User avatar
Active Member

Posts

Joined
Thu Sep 24, 2009 6:27 pm


Post by JAY6390 » Wed Jun 22, 2011 5:56 am

2.0 is going to be having some changes in the coming weeks, so best not to get too ahead of ourselves :-)

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by Qphoria » Wed Jun 22, 2011 10:39 am

JAY6390 wrote:2.0 is going to be having some changes in the coming weeks, so best not to get too ahead of ourselves :-)
Maybe save that rewrite for 3.0 :)
Long live the single file system

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by madimar » Wed Jun 22, 2011 6:59 pm

s31teg, just for you and for other people, I just discovered a very useful web tool to verify xml syntax.
It helped me to solve some issues with my vqmod xml, when I was struggling in a difficult troubleshooting.

The link is:

http://www.w3schools.com/Dom/dom_validate.asp

You can cut & paste your entire xml script and see if there are syntax errors causing problem to the DOM parser.

-----------------------------------------------------------------------
My last mods: Partita IVA e CF | Pro EU VAT Number | Sales Agents | Pricelist Pro
-----------------------------------------------------------------------


User avatar
Active Member

Posts

Joined
Thu Sep 24, 2009 6:27 pm


Post by Qphoria » Wed Jun 22, 2011 9:31 pm

^^ you can also use IE to validate xml

IE has only 2 good uses
- It accurately reports RSS feed errors
- It offers XML validation

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by jcsmithy » Thu Jun 23, 2011 1:06 am

Currently running 1.5.0.5 with vQmod v1.2.3 and having the same issue as before with cache files being generating but no changes are being made.

Tried replacing files from the 1.0.8 version as the first post suggested but still no joy (unsure if that worked for 1.5 anyway).

Tried looking for the 1.1.0 as suggested on page 24/25, but just can't find it anywhere.


Any Ideas?

Active Member

Posts

Joined
Fri Oct 01, 2010 9:54 pm

Post by DannyMacD » Tue Jun 28, 2011 5:28 pm

ok, i seem to understand what VQMOD does, thats great, but im having difficulty understanding how to install.

is someone able to point out to me what to do simply?

im running OC 1.5.0.5

thank you.

Active Member

Posts

Joined
Fri Jun 26, 2009 6:39 am

Post by madimar » Tue Jun 28, 2011 5:45 pm

To be honest Danny, what difficulty you are encountering in vqmod installation? It is everything well written in the instructions... Trying to summarize:
1) copy vqmod folder in your server root (same level of catalog, admin, etc.)
2) open a browser and point to: http://YOURSITE/vqmod/install

This is enough and it works 99%. For the rest of 1% you need some adjustements or manual installation (well documented too).

M

-----------------------------------------------------------------------
My last mods: Partita IVA e CF | Pro EU VAT Number | Sales Agents | Pricelist Pro
-----------------------------------------------------------------------


User avatar
Active Member

Posts

Joined
Thu Sep 24, 2009 6:27 pm


Post by michelk » Tue Jun 28, 2011 5:47 pm

It is an excellent tool but I didn't want to use it as it was. I didn't like the idea of relying on parsing to find where to insert the mods. In fact all I wanted was a way to substitute a script, or whatever file with a versioned one (for example product.php with product_vX.php where X is a version number) in the original directory). I didn't want either to loose the option to do the originally designed parsing based substitution.

Here is what I have done in vqmod.php:

I have added these 2 lines after
public $logging = TRUE;

Code: Select all

    public $useVersion = true;                          // use a pre-loaded version _vx file
    private $filesToVersion = array();					// Keeps a list of all the files that have version number in xml 

In the
__construct function
, after
$source = str_replace("\\", "/", $this->cwd . '/' . $source);
I added:

Code: Select all

                if (strpos($source,"|") !== false) {
                    $sx = explode("|",$source);
                    $source = $sx[0];
                    $version = $sx[1];
                    if ($version != '') $this->filesToVersion[$source] = $version;
                    }
In the
modCheck
function, just before the
// Create tempfile
comment, I added:

Code: Select all

        if ($this->virtualMode && 
            $this->useVersion && 
            array_key_exists ($sourcefile,$this->filesToVersion)) {
          
            $sx = explode("/",$sourcefile);
            $last = array_pop($sx); 
            $sxx = explode(".",$last);
        
            $sxx[0] .= "_v".$this->filesToVersion[$sourcefile];
        
            $last = implode(".",$sxx);
            array_push($sx,$last);
            $tempfile = implode("/",$sx);

            if (file_exists($tempfile)) {
                $msg  = ("SOURCEFILE:  $sourcefile\r\n");
                $msg .= ("USING VERSION VERSION: $tempfile\r\n");
                $this->log($msg);
                return $tempfile;
                }
		
            }
Finally, in the
getFilesToMod
function, I changed [quote$filepaths[] = $file->getAttribute('name');][/quote] with

Code: Select all

 $filepaths[] = $file->getAttribute('name')."|". $file->getAttribute('version');
To use versioned scripts, add the following lines in the xml file (this is an example... please adapt to your needs):

As you can see, I use a
version
attribute.

Code: Select all

	<file name="catalog\view\theme\default\template\product\product.tpl" version="1" >
 	</file>
and do not forget to copy your script (product.tpl) to product_v1.tpl before changing it to your heart's contempt. Personnaly I also comment each block of code I change.

Again, I need to thank Qphoria for doing the heavy lifting.

P.S. All that is based on work I have done in 1973... just to say I know recycling!

http://www.emediacart.com
The emediaCart solution is a plug-n-play hardware-software e-commerce solution. It features a computer the size of a matchbox (4" x 2.5" x 2") running Linux and OpenCart.

Coming soon... emediaBackpack, the only automatic, encrypted, remote service for all OpenCart installations. PM me for more info.


Newbie

Posts

Joined
Mon May 23, 2011 7:26 pm

Post by JAY6390 » Tue Jun 28, 2011 5:51 pm

One small thing you forgot madimar, if the store is in a subfolder, they will need to enter
http://yoursite/subfolder/vqmod/install/
Although as you rightly point out, it's pretty easy

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom
Who is online

Users browsing this forum: No registered users and 3 guests