View Single Post
  #3  
Old 09-02-2011, 05:49 AM
 
jillsybte jillsybte is offline
 

eXpert
  
Join Date: Jun 2006
Location: New York, USA
Posts: 389
 

Default Re: Adding Tabs to Home and Subcategory Pages

I replied to my own post last night (well, very early this morning really), but I must have accidently hit Preview instead of Submit or something because I don't see my reply now. The issue was as I suspected that $f_products is a Smarty variable so it can't be called as is from a PHP file.

I have now replaced $f-products with $smarty->_tpl_vars['f_products'] in my welcome_tabs.php file and everything is working fine. The tab appears with my Featured products when I have Featured products selected, and no tab appears when I deactivate or delete the Featured products.

I call my welcome_tabs.php file - include $xcart_dir . '/include/welcome_tabs.php'; - from home.php after the include './featured_products.php'; line. Then I replaced the following code in welcome.tpl

Code:
{if $active_modules.Bestsellers and $config.Bestsellers.bestsellers_menu ne "Y"} {include file="modules/Bestsellers/bestsellers.tpl"}<br /> {/if} {include file="customer/main/featured.tpl"}

with

Code:
{if $welcome_tabs} {include file="customer/main/ui_tabs.tpl" prefix="welcome-tabs-" mode="inline" tabs=$welcome_tabs} {/if}

I also plan to modify the featured.tpl and bestsellers.tpl templates for appearance.

I haven't looked at it closely yet, but I plan to modify subcategories.tpl as I did welcome.tpl so I can have the tabbed appearance on subcategory pages, too.
__________________
X-Cart Gold 4.1.8 (Live)
BCSE Shipping Estimator for FLC Mod
BCSE Shipping Methods per Product Mod
BCSE Customer Review Management Mod
BCSE Catalog Order Form Mod
X-Cart Gold 4.5.2 (Building/Testing)
USA
Reply With Quote