Addison,
Thank you for the base example. Could you please clarify for me?
Quote:
Originally Posted by ADDISON
Files to start digging the code:
[XC_Dir]/include/product_tabs.php (for creating/arranging actual/new tabs)
[XC_dir]/skin/common_files/customer/tabs.tpl (for 2 columns and ideal_comfort skin there are other files)
In product_tabs.php you can insert a new tab like this:
Code:
$product_tabs[] = array(
'title' => 'Videos',
'tpl' => 'customer/main/tab_videos.tpl',
'anchor' => 'videos'
|
I am trying to make a basic tab at the end of my current tabs. This is what is at the end of my current file.
Code:
if (
!empty($active_modules['Customer_Reviews'])
&& (
$config['Customer_Reviews']['customer_reviews'] == 'Y'
|| $config['Customer_Reviews']['customer_voting'] == 'Y'
)
) {
$product_tabs[] = array(
'title' => func_get_langvar_by_name('lbl_customers_feedback'),
'tpl' => 'modules/Customer_Reviews/vote_reviews.tpl',
'anchor' => 'feedback'
);
}
if (
!empty($active_modules['Advanced_Customer_Reviews'])
) {
func_acr_add_product_tab($product_tabs);
}
if (!empty($product_tabs)) {
$smarty->assign('product_tabs', $product_tabs);
if ($config['Appearance']['display_product_tabs'] == 'Y') {
$smarty->assign('show_as_tabs', true);
}
}
?>
Using your example, I end up with:
Code:
if (
!empty($active_modules['Customer_Reviews'])
&& (
$config['Customer_Reviews']['customer_reviews'] == 'Y'
|| $config['Customer_Reviews']['customer_voting'] == 'Y'
)
) {
$product_tabs[] = array(
'title' => func_get_langvar_by_name('lbl_customers_feedback'),
'tpl' => 'modules/Customer_Reviews/vote_reviews.tpl',
'anchor' => 'feedback'
);
}
if (
!empty($active_modules['Advanced_Customer_Reviews'])
) {
func_acr_add_product_tab($product_tabs);
}
if (!empty($product_tabs)) {
$smarty->assign('product_tabs', $product_tabs);
if ($config['Appearance']['display_product_tabs'] == 'Y') {
$smarty->assign('show_as_tabs', true);
}
}
$product_tabs[] = array(
'title' => 'Videos',
'tpl' => 'customer/main/tab_videos.tpl',
'anchor' => 'videos'
);
?>
Does that look right? I have run cleanup.php, but the tab does not seem to show. My tab_videos.tpl is empty, but I was thinking that the tab should at least show. To test, I also used vote_reviews.tpl to at least populate the tab, but it did not seem to work either.
Any guidance you could give would be greatly appreciated.
Thanks!