1

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.

<modification>

<file name="catalog/view/theme/venice/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?

// UPDATE

  1. I have tried deleting the cache file for vQmod and this has no effect.
  2. The Fiddle of the header file up to the </head> file is here.
  3. I can confirm the above vqmod code works perfectly fine when applied to anything but the theme header files.
Luke C
  • 172
  • 2
  • 13
  • 1
    What version of vQmod are you using and paste the header.tpl contents file in your question. Have you deleted all cache files in your `/vqmod/vqcache/` folder and reloaded the site to see if the files return? – Jay Gilford Oct 04 '14 at 15:18
  • Sorry for late reply. vQmod is latest version (2.5.1 OC) I have added updates to the original question. – Luke C Oct 09 '14 at 09:31
  • Does it work if you switch to the default theme? If it does, it's likely your theme is poorly coded and doesn't use vQMod when including/requiring files - just like it doesn't in the header.tpl file – Jay Gilford Oct 09 '14 at 11:19
  • I think unfortunately it may be the latter. Can you pin down what would be stopping vQmod working in this header.tpl file? Or is this a case that if I want vQmod to work, it would need re-coding altogether? – Luke C Oct 09 '14 at 14:47
  • 1
    If you can find the file that's got the require/include you just need to wrap the file name in the `VQMod::modCheck()` method as they are in all other files – Jay Gilford Oct 09 '14 at 18:00
  • Thank you for the advice. I will look into this and report back. Unfortunately the original developer is not replying to me because this is a "third party issue not covered by support". Madness. I don't entirely know what I am looking for but I am going to have a read into some other theme's code to see if I can see this modCheck() you outlined. Am I okay to contact you here if I have any further questions? Thank you. – Luke C Oct 10 '14 at 10:08
  • Further to my above comment, 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? – Luke C Oct 10 '14 at 11:21
  • 1
    Well the original issue was that you hadn't got vQmod installed, so how you were getting some vqmod edits working is a mystery to be honest. The likely cause of the theme breaking is because it hasn't got the modCheck again on the various includes/requires. You'll either have to add that, or make sure the paths are full paths, not relative paths – Jay Gilford Oct 10 '14 at 11:23
  • I understand! I know what you mean. vQmod was installed by navigating the vqmod/install/install.php, not manually by integrating it into the index.php file. Personally, not too sure on the difference but it works(ish) now. So when you are saying full paths not relative paths, do you mean full path = $this->get->something rather than the developer's $nico_include_path? – Luke C Oct 10 '14 at 11:39
  • Nevermind @JayGilford, I have narrowed it all down with a massive thanks to your comments! A quick google search has given me exactly what I needed to know, the route to the issue, the problem with the code and most importantly a fix to apply. Hopefully I can convince the developer to apply this fix. Thanks again! I know exactly what to do... [helpful link one](http://forum.opencart.com/viewtopic.php?f=24&t=102762) [helpful link two](http://www.kavoir.com/2010/02/php-why-you-should-use-dirname__file__-include-php-instead-of-just-include-php.html) – Luke C Oct 10 '14 at 11:47

0 Answers0