Page 1 of 1

tpl files that break vqmod

Posted: Tue Feb 28, 2012 6:08 am
by elsewhere
so, i spent the better part of the day hardcoding what should have been a simple drag and drop vqmod.

For anyone just getting into theming, please keep in mind that if a tpl file loads any other tpl (not sure about other file types) using a php include, you will break vqmods ability to load and alter that page.

just putting it out there

Re: tpl files that break vqmod

Posted: Wed Feb 29, 2012 4:42 am
by uksitebuilder
php include, require, include_once or require_once are not compatible with vqmod regardless of whether it is a tpl or php or any other file type.

Re: tpl files that break vqmod

Posted: Wed Feb 29, 2012 11:53 am
by Johnathan
uksitebuilder wrote:php include, require, include_once or require_once are not compatible with vqmod regardless of whether it is a tpl or php or any other file type.
Not true, based on Qphoria's post here:
http://forum.opencart.com/viewtopic.php?f=21&t=42461

Re: tpl files that break vqmod

Posted: Wed Feb 29, 2012 1:15 pm
by Qphoria
Johnathan wrote:
uksitebuilder wrote:php include, require, include_once or require_once are not compatible with vqmod regardless of whether it is a tpl or php or any other file type.
Not true, based on Qphoria's post here:
http://forum.opencart.com/viewtopic.php?f=21&t=42461
correct

Tho once the full path is correct, you will likely need to add a line to your vqmod script to convert it to a vqmod line.

In the example from the link

Code: Select all

require 'catalog/view/theme/<themename>/template/product/product_options.tpl'
would need to be modified to

Code: Select all

require($vqmod->modCheck('catalog/view/theme/<themename>/template/product/product_options.tpl'));
then you could use vqmod with that file