Post by reynierpm » Sat Feb 26, 2011 9:04 am

Well something is really wrong here. I have this XML:

Code: Select all

<modification>
    <id>Changes made to account create module to add country code, area code and phone number alowing only digits</id>
    <version>1.0.0</version>
    <vqmver>1.0.9dev</vqmver>
    <author>ReynierPM</author>
    <file name="catalog/view/theme/default/template/common/header.tpl">
        <operation>
            <search position="replace">
                <![CDATA[ <script type="text/javascript" src="catalog/view/javascript/jquery/jquery-1.3.2.min.js"></script> ]]>
            </search>
            <add>
	        <![CDATA[ <script type="text/javascript" src="catalog/view/javascript/jquery/jquery.min.js"></script> ]]>
            </add>
        </operation>
        
        <operation>
            <search position="after">
                <![CDATA[ <script type="text/javascript" src="catalog/view/javascript/jquery/jquery.min.js"></script> ]]>
            </search>
            <add>
	        <![CDATA[ 
                    <script type="text/javascript" src="catalog/view/javascript/jquery/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
                    <script type="text/javascript" src="catalog/view/javascript/jquery/fancybox/jquery.easing-1.3.pack.js"></script>
                    <script type="text/javascript" src="catalog/view/javascript/jquery/fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
                    <link rel="stylesheet" type="text/css" href="catalog/view/javascript/jquery/fancybox/jquery.fancybox-1.3.4.css" />
                    <script type="text/javascript" src="catalog/view/javascript/jquery/tab.js"></script>
                ]]>
            </add>
        </operation>
        
        <operation>
            <search position="replace" offset="2">
                <![CDATA[ <script type="text/javascript" src="catalog/view/javascript/jquery/thickbox/thickbox-compressed.js"></script> ]]>
            </search>
            <add trim="true">
	        <![CDATA[ ]]>
            </add>
        </operation>
     </file>
</modification>
Just change jQuery from 1.3.2 to 1.4.4 (jquery.min.js) and replace thickbox (unsupported) by FancyBox and nothing else but as you can see at page http://libnew.libroria.com a lot of empty lines appears after <?xml version="1.0" encoding="UTF-8"?> around 579 lines A LOT :o ... why this? I'm using vQmod 1.0.8 but something goes wrong :( any help?

User avatar
Active Member

Posts

Joined
Tue Jan 12, 2010 9:51 pm

Post by Qphoria » Sun Feb 27, 2011 1:53 pm

I dont see why this mod would cause that... if you disable this mod do the excess lines go away?

You can try changing the <add> fields to:
<add trim="true"> and see if that helps

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by reynierpm » Mon Feb 28, 2011 12:36 am

Well now I'm confused, vQmod works sometimes good, sometimes not and I do not know what I'm doing wrong because they are the same XML tested elsewhere. See this XML:

Code: Select all

<modification>
    <id>Admin_Controller_Common_header.php</id>
    <version>1.0.0</version>
    <vqmver>1.0.9dev</vqmver>
    <author>ReynierPM</author>
    <file name="admin/controller/common/header.php">
        <operation>
            <search position="after">
                <![CDATA[ $this->data['text_zone'] = $this->language->get('text_zone'); ]]>
            </search>
            <add>
                <![CDATA[ $this->data['text_cover_class'] = $this->language->get('text_cover_class'); ]]>
            </add>
        </operation>
    </file>
</modification>
And now see vqmod.log output:

Code: Select all

2011-02-27 15:37:55.7036400 - VQMOD 1.0.9dev1 INITIALIZED
2011-02-27 15:37:55.7036550 -   virtualMode: TRUE
2011-02-27 15:37:55.7036630 -   vqCachePath: vqmod/vqcache
2011-02-27 15:37:55.7036710 - LIST OF SOURCE FILES TO MODIFY:
2011-02-27 15:37:55.7036780 -   D:/Webserver/htdocs/libroria/install/model/install.php
2011-02-27 15:37:55.7036850 -   D:/Webserver/htdocs/libroria/install/view/template/step_1.tpl
2011-02-27 15:37:55.7036920 -   D:/Webserver/htdocs/libroria/install/controller/step_2.php
2011-02-27 15:37:55.7036990 -   D:/Webserver/htdocs/libroria/install/view/template/step_2.tpl
2011-02-27 15:37:55.7037070 -   D:/Webserver/htdocs/libroria/install/controller/step_3.php
2011-02-27 15:37:55.7037140 -   D:/Webserver/htdocs/libroria/install/view/template/step_3.tpl
2011-02-27 15:37:55.7037210 -   D:/Webserver/htdocs/libroria/system/startup.php
2011-02-27 15:37:55.7037280 -   D:/Webserver/htdocs/libroria/system/engine/controller.php
2011-02-27 15:37:55.7037350 -   D:/Webserver/htdocs/libroria/system/engine/front.php
2011-02-27 15:37:55.7037420 -   D:/Webserver/htdocs/libroria/system/engine/loader.php
2011-02-27 15:37:55.7037500 -   D:/Webserver/htdocs/libroria/system/library/language.php
2011-02-27 15:37:55.7037570 - LIST OF NON-EXISTANT SOURCE FILES REFERENCED IN THE SCRIPTS:
2011-02-27 15:37:55.7037640 - BEGIN MODS...
2011-02-27 15:37:55.7056530 - -----------------------------------------------------
2011-02-27 15:37:55.7056640 - SOURCEFILE:  D:/Webserver/htdocs/libroria/system/startup.php
2011-02-27 15:37:55.7056720 - MODFILE:     D:/Webserver/htdocs/libroria/vqmod/xml/vqmod_opencart.xml
2011-02-27 15:37:55.7056800 - TEMPFILE:    D:/Webserver/htdocs/libroria/vqmod/vqcache/vqcache__system__startup.php
2011-02-27 15:37:55.7070170 -   OPERATION...
2011-02-27 15:37:55.7070280 -     ERROR:      
2011-02-27 15:37:55.7070360 -     SEARCH:     %(DIR_SYSTEM \. '(engine|library)/[^\.]+\.php')%
2011-02-27 15:37:55.7070420 -       POSITION: replace
2011-02-27 15:37:55.7070490 -       OFFSET:   
2011-02-27 15:37:55.7070560 -       INDEX:    
2011-02-27 15:37:55.7070620 -       REGEX:    true
2011-02-27 15:37:55.7070690 -     ADD:        $vqmod->modCheck($1)
2011-02-27 15:37:55.7085860 -   OPERATION COMPLETED SUCCESSFULLY!
2011-02-27 15:37:55.7131240 - TEMPFILE UPDATED WITH MODIFIED CODE
2011-02-27 15:37:55.7143030 - SUBSTITUTION COMPLETE!
2011-02-27 15:37:55.7170160 - -----------------------------------------------------
2011-02-27 15:37:55.7170270 - SOURCEFILE:  D:/Webserver/htdocs/libroria/system/engine/controller.php
2011-02-27 15:37:55.7170350 - MODFILE:     D:/Webserver/htdocs/libroria/vqmod/xml/vqmod_opencart.xml
2011-02-27 15:37:55.7170430 - TEMPFILE:    D:/Webserver/htdocs/libroria/vqmod/vqcache/vqcache__system__engine__controller.php
2011-02-27 15:37:55.7184690 -   OPERATION...
2011-02-27 15:37:55.7184800 -     ERROR:      
2011-02-27 15:37:55.7184870 -     SEARCH:     if (file_exists($file)) {
2011-02-27 15:37:55.7184940 -       POSITION: before
2011-02-27 15:37:55.7185010 -       OFFSET:   
2011-02-27 15:37:55.7185070 -       INDEX:    
2011-02-27 15:37:55.7185140 -       REGEX:    
2011-02-27 15:37:55.7185210 -     ADD:        global $vqmod; $file = $vqmod->modCheck($file);
2011-02-27 15:37:55.7196340 -   OPERATION COMPLETED SUCCESSFULLY!
2011-02-27 15:37:55.7246500 - TEMPFILE UPDATED WITH MODIFIED CODE
2011-02-27 15:37:55.7257560 - SUBSTITUTION COMPLETE!
2011-02-27 15:37:55.7275450 - -----------------------------------------------------
2011-02-27 15:37:55.7275590 - SOURCEFILE:  D:/Webserver/htdocs/libroria/system/engine/front.php
2011-02-27 15:37:55.7275670 - MODFILE:     D:/Webserver/htdocs/libroria/vqmod/xml/vqmod_opencart.xml
2011-02-27 15:37:55.7275740 - TEMPFILE:    D:/Webserver/htdocs/libroria/vqmod/vqcache/vqcache__system__engine__front.php
2011-02-27 15:37:55.7290420 -   OPERATION...
2011-02-27 15:37:55.7290550 -     ERROR:      
2011-02-27 15:37:55.7290630 -     SEARCH:     if (file_exists($file)) {
2011-02-27 15:37:55.7290700 -       POSITION: before
2011-02-27 15:37:55.7290760 -       OFFSET:   
2011-02-27 15:37:55.7290830 -       INDEX:    
2011-02-27 15:37:55.7290890 -       REGEX:    
2011-02-27 15:37:55.7290960 -     ADD:        global $vqmod; $file = $vqmod->modCheck($file);
2011-02-27 15:37:55.7301650 -   OPERATION COMPLETED SUCCESSFULLY!
2011-02-27 15:37:55.7333190 - TEMPFILE UPDATED WITH MODIFIED CODE
2011-02-27 15:37:55.7343800 - SUBSTITUTION COMPLETE!
2011-02-27 15:37:55.7358570 - -----------------------------------------------------
2011-02-27 15:37:55.7358670 - SOURCEFILE:  D:/Webserver/htdocs/libroria/system/engine/loader.php
2011-02-27 15:37:55.7358730 - MODFILE:     D:/Webserver/htdocs/libroria/vqmod/xml/vqmod_opencart.xml
2011-02-27 15:37:55.7358780 - TEMPFILE:    D:/Webserver/htdocs/libroria/vqmod/vqcache/vqcache__system__engine__loader.php
2011-02-27 15:37:55.7372790 -   OPERATION...
2011-02-27 15:37:55.7372910 -     ERROR:      
2011-02-27 15:37:55.7372990 -     SEARCH:     if (file_exists($file)) {
2011-02-27 15:37:55.7373070 -       POSITION: before
2011-02-27 15:37:55.7373140 -       OFFSET:   
2011-02-27 15:37:55.7373230 -       INDEX:    
2011-02-27 15:37:55.7373310 -       REGEX:    
2011-02-27 15:37:55.7373380 -     ADD:        global $vqmod; $file = $vqmod->modCheck($file);
2011-02-27 15:37:55.7382640 -   OPERATION COMPLETED SUCCESSFULLY!
2011-02-27 15:37:55.7410040 - TEMPFILE UPDATED WITH MODIFIED CODE
2011-02-27 15:37:55.7419520 - SUBSTITUTION COMPLETE!
2011-02-27 15:37:55.7465250 - -----------------------------------------------------
2011-02-27 15:37:55.7465360 - SOURCEFILE:  D:/Webserver/htdocs/libroria/system/library/language.php
2011-02-27 15:37:55.7465420 - MODFILE:     D:/Webserver/htdocs/libroria/vqmod/xml/vqmod_opencart.xml
2011-02-27 15:37:55.7465470 - TEMPFILE:    D:/Webserver/htdocs/libroria/vqmod/vqcache/vqcache__system__library__language.php
2011-02-27 15:37:55.7478870 -   OPERATION...
2011-02-27 15:37:55.7478970 -     ERROR:      
2011-02-27 15:37:55.7479020 -     SEARCH:     require($default);
2011-02-27 15:37:55.7479210 -       POSITION: before
2011-02-27 15:37:55.7479270 -       OFFSET:   
2011-02-27 15:37:55.7479320 -       INDEX:    
2011-02-27 15:37:55.7479370 -       REGEX:    
2011-02-27 15:37:55.7479420 -     ADD:        global $vqmod; $default = $vqmod->modCheck($default);
2011-02-27 15:37:55.7490170 -   OPERATION COMPLETED SUCCESSFULLY!
2011-02-27 15:37:55.7497910 -   OPERATION...
2011-02-27 15:37:55.7498010 -     ERROR:      
2011-02-27 15:37:55.7498080 -     SEARCH:     require($file);
2011-02-27 15:37:55.7498140 -       POSITION: before
2011-02-27 15:37:55.7498200 -       OFFSET:   
2011-02-27 15:37:55.7498260 -       INDEX:    
2011-02-27 15:37:55.7498320 -       REGEX:    
2011-02-27 15:37:55.7498380 -     ADD:        global $vqmod; $file = $vqmod->modCheck($file);
2011-02-27 15:37:55.7507320 -   OPERATION COMPLETED SUCCESSFULLY!
2011-02-27 15:37:55.7531260 - TEMPFILE UPDATED WITH MODIFIED CODE
2011-02-27 15:37:55.7538330 - SUBSTITUTION COMPLETE!
If you see at top exists a few changes in installer, right? Ok those changes never was displayed. Then inside XML folders is a file called admin_controller_common_header.xml? Did you see in files to change? I don't and really don't know the cause. Where is the problem? I'm doing something wrong and I miss here? Really vQmod is amazing but give me a lot of headaches in past days until now.

Cheers and thx in advance

User avatar
Active Member

Posts

Joined
Tue Jan 12, 2010 9:51 pm

Post by Qphoria » Mon Feb 28, 2011 1:55 am

The installer won't change without the updates from Fido a few pages back. Basically you need to change the install/index.php file to support vqmod. I didn't add that to the readme

For the other file, it is true that it is weird to not show.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by reynierpm » Mon Feb 28, 2011 2:18 am

:( what you recommend me in this case?

User avatar
Active Member

Posts

Joined
Tue Jan 12, 2010 9:51 pm

Post by Qphoria » Mon Feb 28, 2011 2:23 am

attach that xml file and ill try it

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by reynierpm » Mon Feb 28, 2011 2:27 am

Here it's ... it have a few more code I just put some lines here

Attachments


User avatar
Active Member

Posts

Joined
Tue Jan 12, 2010 9:51 pm

Post by Qphoria » Mon Feb 28, 2011 2:32 am

Works fine for me. Do you have the code in the admin/index.php file that is needed for vqmod as well? Do any mods you have for admin work?

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by ritey » Fri Mar 04, 2011 11:16 pm

Hi Q,

Started looking at the vQmod stuff last night briefly and first thing that popped into my head was what happens if the core is updated and includes something that was a mod, with vQmod still adding the same code on the fly, is there potential for duplicated code to cause errors or can vQmod tell if there code that is being "injected" is already present?

Dave
www.coderstudios.com


User avatar
Active Member

Posts

Joined
Fri Jan 22, 2010 4:28 am
Location - Richmond

Post by Qphoria » Fri Mar 04, 2011 11:21 pm

ritey wrote:Hi Q,

Started looking at the vQmod stuff last night briefly and first thing that popped into my head was what happens if the core is updated and includes something that was a mod, with vQmod still adding the same code on the fly, is there potential for duplicated code to cause errors or can vQmod tell if there code that is being "injected" is already present?
yes there is potential for duplicate. I am working on getting it to match the existing code to see if the change already exists, but it is difficult for the same reason multiline search is difficult. But it is always easier to edit that one file or download an updated version to fix it. vQmods are still mods like any other.. the base code has to be set to work with the mod.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by ritey » Fri Mar 04, 2011 11:40 pm

Sure, it's a great addition don't get me wrong, just excited to play with it and it gets the brain thinking about other possibilities :)

Dave
www.coderstudios.com


User avatar
Active Member

Posts

Joined
Fri Jan 22, 2010 4:28 am
Location - Richmond

Post by opencartisalright » Wed Mar 09, 2011 6:56 am

Qphoria,

Why is vQmod so damn cool? ;D

Active Member

Posts

Joined
Mon Feb 21, 2011 4:09 am

Post by craig100 » Fri Mar 11, 2011 9:13 pm

This looks very exciting from my perspective as an OpenCart noob. I'm looking into using it to get over a problem I'm having with a multi-store installation. I have a main store in which I've modified /catalog/controller/common/header.php (and others) which look fine. However, these changes are also on the sub-store. Can VirtualQMod be used to make different changes to controllers for each store? My only other option is to use two separate OpenCart installations, which I'd rather not do if possible.

Craig

Newbie

Posts

Joined
Mon Feb 28, 2011 7:50 pm

Post by JAY6390 » Fri Mar 11, 2011 9:17 pm

Hey Craig. vQmod doesn't differentiate between the stores (in fact it's a system completely separate from the cart software)

Image


User avatar
Guru Member

Posts

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

Post by Xsecrets » Fri Mar 11, 2011 9:18 pm

craig100 wrote:This looks very exciting from my perspective as an OpenCart noob. I'm looking into using it to get over a problem I'm having with a multi-store installation. I have a main store in which I've modified /catalog/controller/common/header.php (and others) which look fine. However, these changes are also on the sub-store. Can VirtualQMod be used to make different changes to controllers for each store? My only other option is to use two separate OpenCart installations, which I'd rather not do if possible.

Craig
no vqmod does not make changes per store. There is nothing that can do that if you are talking about controller files, but then again I really don't see why you would need different changes per store in the controller files. If it's just a looks thing you need to create multiple theme's and apply them to the different stores, and edit the .tpl files per store all you want.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by JAY6390 » Fri Mar 11, 2011 9:20 pm

I suppose you could use an if statement around certain blocks of code and the store id...but it's hardly practical

Image


User avatar
Guru Member

Posts

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

Post by craig100 » Fri Mar 11, 2011 10:06 pm

For instance, I changed the header layout around for the main store. The link to the sub-store set to shop.mainstore in the header controller. In the sub-store I'll need a different link, but that's controlled by the same controller!

I guess the multi-store stuff is only any use if all you want to change is main content stylistic stuff, not header and footer layouts. So I guess I don't need vQmod at all, what I need is two, totally separate OC installations and databases, which is a disappointment when members of one store are meant to be members of the other:(

Newbie

Posts

Joined
Mon Feb 28, 2011 7:50 pm

Post by JAY6390 » Fri Mar 11, 2011 10:12 pm

You could get it to work as I say. Get the $_SERVER['HTTP_HOST'] value, and put a conditional in your controller
Of course you could just edit your templates assuming they have different templates, and hard code the link in

Image


User avatar
Guru Member

Posts

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

Post by craig100 » Fri Mar 11, 2011 10:20 pm

Thanks for that Jay. Sounds like it will be helpful. Just getting to grips with OC and MVC all at the same time;)

Newbie

Posts

Joined
Mon Feb 28, 2011 7:50 pm

Post by Xsecrets » Fri Mar 11, 2011 10:34 pm

you can change the "layout" 100% by giving each store a different template/theme. And as for the variables all coming from one controller. While it may not be ideal you could easily create say $store1_home_href $store2_home_href then call whichever one you need from the template for a given store. Yes that will pollute the controller a bit, but I think a few extra variables in your controller would be easier to maintain than separate installs.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US
Who is online

Users browsing this forum: No registered users and 7 guests