Quote Originally Posted by marcopm View Post
First of all, thank you lat9 for this incredible work, such a useful and well done template!

I am scratching my head about the specials, all products, etc. pages.

Let's take the specials page for example. Both header_php.php and header_php_special_zca_bootstrap.php are loaded.

The first one (actually it's the main_template_vars.php in this case, but it's not that important) runs the query, calls splitPageResults (the "original" one), etc. and saves the results into $list_box_contents.

Then header_php_special_zca_bootstrap.php does some similar stuff, but with some adjustments for the bootstrap template, and saves to $listing_sql and $column_list variable.

If I'm not mistaken (please correct me if I'm wrong) the data extracted from header_php.php is not used at all, as tpl_modules_product_listing.php is called in the template, which only considers the data from header_php_special_zca_bootstrap.php ($listing_sql and $column_list variable) and produces its "own" $list_box_contents, which is the only one that will be used in the final page.

I guess header_php.php has been left as it is - despite the overhead - so as not to override too many core files, right? And because right now there's no way to tell ZC "for this page just load this header file and not that", without making some changes to the header files themselves (or to some other core files).
Or is it because the data extracted in header_php.php for these pages is/may be used somewhere else too?
No correction necessary. You've captured what's going on. While the queries are redundant, there's no way to tell the 'core' header_php.php to not generate that query and I'm not a big fan of core-file overwrites, so there's a bit of overhead in the generation of those product listings.