View Single Post
  #1  
Old 05-25-2004, 07:29 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default Featured Products as a side menu

heres a simple one. works the same as featured products but just drops it in the side menu instead of in the center.

create a new file called menu_featured.tpl and store it in skin1 dir

Code:
{* $Id: menu_featured.tpl,v 1.8 2004/05/22 Shan Exp $ *} {if $f_products ne ""} {capture name=menu} {section name=num loop=$f_products} <table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td align="center" valign="top"> {$f_products[num].product} </td> </tr> <tr> <td align="center" valign="top"> <a href=product.php?productid={$products[product].productid}&cat={$cat}&page={$navigation_page}> {include file="product_thumbnail.tpl" productid=$f_products[num].productid image_x=75 product=$f_products[num].product tmbn_url=$f_products[num].tmbn_url} </a> </td> </tr> <tr> <td align="center" valign="top"> <font class=ProductPrice>{$lng.lbl_our_price}: {include file="currency.tpl" value=$f_products[num].price}</font><font class=MarketPrice>{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$f_products[num].price}</font> </td> </tr> </table> <hr> {/section} {/capture} { include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title="Featured Items" menu_content=$smarty.capture.menu } {/if}

now open up skin1/customer/home.tpl and insert this where you want the menu item to appear

Code:
{include file="menu_featured.tpl"}

Once youve done that you can remove the old featured products from the center areas.

Open skin1/customer/main/welcome.tpl and remove

Code:
{include file="customer/main/featured.tpl" f_products=$f_products}

Then open skin1/customer/subcategories.tpl and remove or comment out

Code:
{if $f_products ne ""} {include file="customer/main/featured.tpl"} {/if}

Works in 3.5.x but should work in other versions too
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote