Page 1 of 1

A Note to Theme makers...

Posted: Mon Oct 03, 2011 11:41 am
by Qphoria
I noticed a few theme makers are splitting off the options and other bits into separate tpl files. Then using include/require to include them into the overall page. This is fine but may I ask for a slight change.

The method you use to include them is:

Code: Select all

require 'product_options.tpl';
This causes problems for vQmod scripts that need to alter parts of the page because it uses a relative path to the product.tpl file instead of a relative path to the controller.

please instead use:

Code: Select all

require 'catalog/view/theme/<themename>/template/product/product_options.tpl'
This will resolve the issues.

Current known themes with this issue: shoppica and two other ones I've run into (i forget the names)

Re: A Note to Theme makers...

Posted: Mon Oct 03, 2011 9:08 pm
by Johnathan
Good to know.

Re: A Note to Theme makers...

Posted: Mon Oct 24, 2011 8:50 pm
by themeburn
Qphoria wrote:I noticed a few theme makers are splitting off the options and other bits into separate tpl files. Then using include/require to include them into the overall page. This is fine but may I ask for a slight change.

The method you use to include them is:

Code: Select all

require 'product_options.tpl';
This causes problems for vQmod scripts that need to alter parts of the page because it uses a relative path to the product.tpl file instead of a relative path to the controller.

please instead use:

Code: Select all

require 'catalog/view/theme/<themename>/template/product/product_options.tpl'
This will resolve the issues.

Current known themes with this issue: shoppica and two other ones I've run into (i forget the names)
Thanks for the hint. We will change all of the require statements in our theme, as you suggest.

Re: A Note to Theme makers...

Posted: Sun Mar 11, 2012 6:34 pm
by d_koev
Thanks for the tips, Q! I'll change this too in my themes where it is used.

Re: A Note to Theme makers...

Posted: Sun Mar 11, 2012 7:26 pm
by MarketInSG
Hmm...noted it :)