Re: Re: Re: Ok,Now I am back working on

end user's picture
Offline
Joined: 01/11/2008
Juice: 1685
Re: Re: Re: Ok,Now I am back working on

The main image, title, rating, comments and etc.. are just a node-product-tpl.php that I change to suit my needs. The buy now button which I'm still working on is a view in a custom region that's inside the node template.

The quick tabs themselves are also inserted into a custom region in the node template but then I used two views. one for each tab to grab CCK fields and have the tab/view display them. I've tried to insert the comments onto its own tab but that's a pain as the comments are part of the node body and hard to seperate.

Here's the code in template.php that I use to be able to use custom node regions - normally you can only do custom regions in the page.tpl.php file

function yourtheme_preprocess_node(&$variables, $hook) {
  $variables['product_node_price'] = theme('blocks', 'product_node_price');
  $variables['product_info_tabs'] = theme('blocks', 'product_info_tabs');
}

Then in youtheme.info file you specify the new regions

regions[product_node_price] = Product Node Price
regions[product_info_tabs] = Product Info Tabs

In the node template

<?php print $product_info_tabs ?>

Product Tabs By: patrickhannon86 (40 replies) Tue, 08/18/2009 - 22:19