X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Featured Products as a side menu (https://forum.x-cart.com/showthread.php?t=7748)

shan 05-25-2004 07:29 AM

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

abeight 05-25-2004 08:42 AM

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?

TonyD 05-25-2004 09:19 AM

is there a category.tpl that can replace the featured products?

camelia 11-10-2004 01:06 AM

Great mod, but how to make it pick 1 product at random?

mrbiggles 02-07-2005 05:44 AM

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 :lol: 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

mffowler 02-07-2005 01:40 PM

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

- Mike

mrbiggles 02-07-2005 01:51 PM

Well that certainly stopped my head getting too big, thanks for that.
Regards Adam

garry 10-01-2005 05:39 AM

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

groovico 10-01-2005 10:48 AM

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.

slillig 02-13-2006 01:38 AM

Anyone find away to put this featured products menu on every page (global) throughout the entire site?


All times are GMT -8. The time now is 09:21 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.