Hello,
I'm currently writing a ZC module for Nochex which is almost finished. I would appreciate any assistance getting the final touches done.
Because Nochex now allow you to specify a custom HTML header and footer when you forward buyers for payment, I would like the Zen module to produce this custom HTML automatically, using a store's current template. I have done something similar with another popular cart package by producing a dummy page on-the-fly with custom content (in this case, an HTML comment) and capturing the page into a PHP variable. I was then able to split the page appropriately into a header and a footer, filtering out everything except the contents of the <body> tags in the process.
Trying to accomplish something similar with Zen is trying to say the least. Can anyone explain how the template system works, and why I can't simply perform the following?
PHP Code:
// Switch on output-buffering, print the page, capture it and clean/stop the output buffer
ob_start();
include($template->get_template-dir('tpl_main_page.php', DIR_WS_TEMPLATE, $current_page_base, 'common') . '/tpl_main_page.php');
$page = ob_get_contents();
ob_end_clean();
Ultimately, all I want is the very top of the page, minus any boxes normally shown to the left and right, and the very foot of the page (after all the boxes). Apologies for the rambling post, but any help would be greatly appreciated!