Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Featured Products as a side menu

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #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
  #2  
Old 05-25-2004, 08:42 AM
  abeight's Avatar 
abeight abeight is offline
 

X-Adept
  
Join Date: Nov 2003
Location: Cleveland, OH
Posts: 479
 

Default

This is great, Shan. Here's a quick question though. What if you want to leave the featured products on the main page, and also have one additional product that shows in the menu box?
__________________
~ Andrea Beight
Reply With Quote
  #3  
Old 05-25-2004, 09:19 AM
 
TonyD TonyD is offline
 

eXpert
  
Join Date: Mar 2004
Location: Okc
Posts: 288
 

Default

is there a category.tpl that can replace the featured products?
Reply With Quote
  #4  
Old 11-10-2004, 01:06 AM
 
camelia camelia is offline
 

Member
  
Join Date: Oct 2004
Posts: 18
 

Default

Great mod, but how to make it pick 1 product at random?
__________________
x-Cart Gold V3.5.11
Reply With Quote
  #5  
Old 02-07-2005, 05:44 AM
 
mrbiggles mrbiggles is offline
 

Senior Member
  
Join Date: Jan 2005
Location: Adelaide , South Australia
Posts: 107
 

Default

Hello I put this mod on my cart and was very impressed, then I clicked the image and got "access denied error ID:33"
I really wanted this mod so I did not give up. I noticed the description above the picture allowed me to link through to the detailed description of the product, so I took a gamble and replaced

<a href=product.php?productid={$products[product].productid}&cat={$cat}&page={$navigation_page}>

with this

<a href=product.php?productid={$f_products[num].productid}}&cat={$cat}&page={$navigation_page}>


and it worked I am not experienced in this and this change is probably very basic but I can feel my head starting to expand already.

Im sure the saying "knows enough to be dangerous" comes to mind when some of you read this.

Hopefully there will not be any side effects from what I have done, because of my lack of knowledge I rely on a good backup and trial and error.
I have my ftp client ready, if I do something that stops the site running (about 8 times so far) I just upload the backup file.

I really like the drop down menus for manufacturers and categories but I cannot find anywhere where I can increase the visible number above 10 categories or manufacturers.
Regards Adam
__________________
www.creydall.com
X-Cart version 4.0.11
PHP 4.3.9 MySQL 4.0.22
Apache/1.3.33
Perl 5.008004
Adam
Adelaide South Australia
Reply With Quote
  #6  
Old 02-07-2005, 01:40 PM
 
mffowler mffowler is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Melbourne, Australia
Posts: 811
 

Default

Increase the # of manufacturers in Gen. Settings/Module Options

- Mike
__________________
4.1.9
Reply With Quote
  #7  
Old 02-07-2005, 01:51 PM
 
mrbiggles mrbiggles is offline
 

Senior Member
  
Join Date: Jan 2005
Location: Adelaide , South Australia
Posts: 107
 

Default

Well that certainly stopped my head getting too big, thanks for that.
Regards Adam
__________________
www.creydall.com
X-Cart version 4.0.11
PHP 4.3.9 MySQL 4.0.22
Apache/1.3.33
Perl 5.008004
Adam
Adelaide South Australia
Reply With Quote
  #8  
Old 10-01-2005, 05:39 AM
 
garry garry is offline
 

Senior Member
  
Join Date: Oct 2003
Location: Wolverhampton UK
Posts: 102
 

Default

Great mod, does anyone know how to display the featured products on every page?
What I want to do is display the featured products that appear on the home page on all other pages not just the products that have been selected for the current category
__________________
Garry


http://www.natralife.co.uk


X-Cart Gold version 4.5.4
PHP 5.3.18
MySQL client 5.0.96
Reply With Quote
  #9  
Old 10-01-2005, 10:48 AM
  groovico's Avatar 
groovico groovico is offline
 

X-Man
  
Join Date: Apr 2003
Location: Firetanksoftware.com
Posts: 2,326
 

Default

Quote:
Originally Posted by garry
Great mod, does anyone know how to display the featured products on every page?
What I want to do is display the featured products that appear on the home page on all other pages not just the products that have been selected for the current category

You might be interested to know we have an add on that will be released very soon which will allow you to do this and alot more, if you're interested in being on the pre-release offer list please let me know.
__________________
Groovico

Used by X-carters the world over:
Marketing Manager Pro Bundle For X-cart
Featured Product Manager for X-cart
Feed manager pro for X-cart

http://www.firetanksoftware.com

Celebrating 7 Years of providing quality X-cart Add ons and X-cart Mods for x-cart 3.X to X-cart 4.4.X
Reply With Quote
  #10  
Old 02-13-2006, 01:38 AM
 
slillig slillig is offline
 

Member
  
Join Date: Nov 2005
Posts: 13
 

Default

Anyone find away to put this featured products menu on every page (global) throughout the entire site?
__________________
x-cart gold 4.0.17 [unix]
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 12:08 PM.

   

 
X-Cart forums © 2001-2020