Post by sugarskull » Sat Oct 04, 2014 9:34 pm

I am currently in a situation where vQmod will not work at all exclusively on files related to a theme. I have contacted the developer who has very rudely refused to assist and won't text vQmod code on their demo store server for me. The theme is well-built and looks good after my custom modifications but the one major flaw is that vQmod just won't work.

Is there anything wrong with the following code to modify the venice tpl file? I have checked and double checked that the file path is correct.

Code: Select all

<modification>

<file name="catalog/view/theme/*/template/common/header.tpl">
        <operation>
            <search position="after"><![CDATA[
            </head>
            ]]></search>
            <add>
            <![CDATA[ <style>.vqmod-works { } </style> ]]>
</add>
        </operation>
</file>

</modification>
If this code above is correct, then I am bewildered as to why vQmod won't work and if anyone has a fix for this, whether it be my code or somewhere to look to see if vQmod is being 'blocked' or something?

Thank you.
Last edited by sugarskull on Mon Oct 13, 2014 6:35 pm, edited 1 time in total.

New member

Posts

Joined
Fri Nov 23, 2012 8:50 am

Post by victorj » Sat Oct 04, 2014 10:37 pm

the vqmod code is probally right.
You theme probally has different coding for that particular line, so vqmod is not able to find it and as result not producing the modified file.
You will have to add correct line of code in vqmod for your template.

Koeltechnische deurrubbers eenvoudig online op maat bestellen.
Alle niet stekplichtige onderdelen zoals scharnieren, sloten, randverwarming en verlichting voor alle typen koelingen en vriezers.
https://koelcel-onderdelen.com


User avatar
Expert Member

Posts

Joined
Sat Jun 25, 2011 4:09 am
Location - Alkmaar Holland

Post by sugarskull » Fri Oct 10, 2014 6:55 pm

Hi @victorj
Apologies for my late reply.

I have checked the code, the </head> file is definitely there as is. It is not wrapped in any php, it is simple raw html and therefore renders as is.

I have a fiddle here: http://jsfiddle.net/hdgh6gj/1/ of a snippet of the header.tpl file.

I have figured out a couple of thing with the help of a developer but I am at a brick wall and don't know how to fix my problem - I don't know much vQmod. Just the simple stuff.

1) The theme doesn't use vQMod when including/requiring files - just like it doesn't in the header.tpl file
and my advice is to:
2) Find the file that's got the require/include and I just need to wrap the file name in the VQMod::modCheck() method as they are in all other files.

This is as far as I can go unfortunately though, but it is essential I enable vQmod for this theme. Not only is it a complete waste of money for me if it is not enabled, but I have some important mods that are essential to the usability of the website.

Could you or anyone else help with fixing this code with me?
Last edited by sugarskull on Mon Oct 13, 2014 6:36 pm, edited 1 time in total.

New member

Posts

Joined
Fri Nov 23, 2012 8:50 am

Post by sugarskull » Fri Oct 10, 2014 7:22 pm

Further to my above reply: ^^

I have manually installed vQmod into the core index.php and admin/index.php files.

This gives the following result:
1) Some tpl files seem to work with vQmod now, including the header.tpl.
2) However, it seems to have broken anything related to this theme eg custom modules and some pages (e.g product page).

Other than waiting for a reply from the developer that may never come, I am unsure as to what to do next? ??? :(

New member

Posts

Joined
Fri Nov 23, 2012 8:50 am

Post by sytra » Fri Oct 10, 2014 7:27 pm

Does it make any difference if you alter the xml from:

Code: Select all

<file name="catalog/view/theme/venice/template/common/header.tpl">
to:

Code: Select all

<file name="catalog/view/theme/*/template/common/header.tpl">
We had to do this on a few mods to get them to work on a custom theme.

Running OC 1.5.5.1 with vqmods.
http://www.aislings.co.uk
http://www.lovers-paradise-toys.co.uk


Active Member

Posts

Joined
Sat Feb 04, 2012 6:27 am

Post by sugarskull » Fri Oct 10, 2014 8:06 pm

I have unfortunately tried this with no fix. I do believe I have figured this issue out with the help of this post:
http://forum.opencart.com/viewtopic.php?f=24&t=102762

I have forced vQmod on all the files by manually hard coding it into the core index.php file. After I did this, the vQmod started to work for the header.tpl file but broke a few custom modules that came with the theme and the product page stopped working - producing a blank page.

I believe that the issue may be with that the theme is built using relative paths rather than absolute paths. I think my job now is to convert all theme relative paths to absolute to make it compatible with vQmod BUT I have minimal expertise so this may be a struggle and may induce further bugs as I didn't write the initial code. :(

New member

Posts

Joined
Fri Nov 23, 2012 8:50 am

Post by rph » Sat Oct 11, 2014 2:29 am

Style needs to be in the head tag. Change the search position to "before".

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by sugarskull » Mon Oct 13, 2014 6:35 pm

Hi,
I've solved the issue. I've read through all theme files and changed any relative paths to absolute. This has made the theme compatible with vQmod and doesn't produce any more errors.

@rph, thanks for your reply. The initial code was just for testing purposes, not practical. I knew it did nothing, it was just a simple case of see if it showed up in my source code or not. But thank you for your time and help also.

New member

Posts

Joined
Fri Nov 23, 2012 8:50 am
Who is online

Users browsing this forum: No registered users and 26 guests