Page 1 of 1

vQmod won't work for a specific theme

Posted: Sat Oct 04, 2014 9:34 pm
by sugarskull
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


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

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.

Re: vQmod won't work for a specific theme

Posted: Sat Oct 04, 2014 10:37 pm
by victorj
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.

Re: vQmod won't work for a specific theme

Posted: Fri Oct 10, 2014 6:55 pm
by sugarskull
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: 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?

Re: vQmod won't work for a specific theme

Posted: Fri Oct 10, 2014 7:22 pm
by sugarskull
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? ??? :(

Re: vQmod won't work for a specific theme

Posted: Fri Oct 10, 2014 7:27 pm
by sytra
Does it make any difference if you alter the xml from:

Code: Select all

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

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.

Re: vQmod won't work for a specific theme

Posted: Fri Oct 10, 2014 8:06 pm
by sugarskull
I have unfortunately tried this with no fix. I do believe I have figured this issue out with the help of this post:

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. :(

Re: vQmod won't work for a specific theme

Posted: Sat Oct 11, 2014 2:29 am
by rph
Style needs to be in the head tag. Change the search position to "before".

Re: vQmod won't work for a specific theme

Posted: Mon Oct 13, 2014 6:35 pm
by sugarskull
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.