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

Graphical Buttons link back to main page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-01-2003, 04:56 PM
 
ahunte ahunte is offline
 

Newbie
  
Join Date: Mar 2003
Posts: 3
 

Default Graphical Buttons link back to main page

I wanted to change the xcart menu buttons to my graphical buttons, so I use the information in the post
http://forum.x-cart.com/viewtopic.php?t=622 to get an xcart template to load in the home_main.tpl section of my page. I had the buttons load from newmenu.tpl, which works fine. The problem is that when you click on the menu buttons, it just loops back and shows the welcome.tpl information. You can see what I am talking about on my page http://www.presariophotos.com/xcart . I have checked my home.tpl code:
Code:
{* $Id: home.tpl,v 1.42 2002/10/22 10:27:05 olga Exp $ *} { config_load file="$skin_config" } <html> <head> <title>{$lng.txt_site_title} {if $main eq "catalog"} {if $location eq ""} {$lng.txt_subtitle_home} {else} {strip} {section name=position loop=$location start=0 } {if %position.last% eq "true"} - {$location[position].0|escape}{/if} {/section} {/strip} {/if} {elseif $main eq "product"} {if $product.product ne ''} - {$product.product}{/if} {elseif $main eq "help"} {$lng.txt_subtitle_help} {elseif $main eq "cart"} {$lng.txt_subtitle_cart} {elseif $main eq "checkout"} {$lng.txt_subtitle_checkout} {elseif $main eq "order_message"} {$lng.txt_subtitle_thankyou} {/if} </title> { include file="meta.tpl" } <link rel="stylesheet" href="{$SkinDir}/{#CSSFile#}"> </head> <body LEFTMARGIN=0 TOPMARGIN=0 RIGHTMARGIN=0 BOTTOMMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0> { include file="rectangle_top.tpl" } { include file="head.tpl" } <table border=0 width=85% cellpadding=0 cellspacing=0 align="center"> <tr> <!-- Taking out to test <td class=VertMenuBox width=6></td> --> <td class=VertMenuBox width=119 valign=top> { include file="newmenu.tpl" } <!-- Taking out catagories (events) { include file="customer/categories.tpl" } --> <!-- {if $active_modules.Bestsellers ne "" and $config.Modules.bestsellers_menu eq "Y"} { include file="modules/Bestsellers/menu_bestsellers.tpl" } {/if} --> <!-- Moving Gift Certificates & help to the other column {if $active_modules.Gift_Certificates ne ""} { include file="modules/Gift_Certificates/gc_menu.tpl" } {/if} End Move --> { include file="help.tpl" } </td> <td width=20></td> <td valign=top> {include file="customer/home_main.tpl"} </td> <td width=20></td> <td width=120 valign=top> { include file="customer/menu_cart.tpl" } {if $login eq "" } { include file="auth.tpl" } {else} { include file="authbox.tpl" } {/if} {if $active_modules.Gift_Certificates ne ""} { include file="modules/Gift_Certificates/gc_menu.tpl" } {/if} { include file="news.tpl" } { include file="poweredby.tpl" } </td> </tr> <tr> <td class=VertMenuBox></td> <td>&nbsp</td> <td>{ include file="copyright.tpl" }</td> <td></td> <td></td> </tr> </table> { include file="rectangle_bottom.tpl" } </body> </html>

And my home_tpl code:
Code:
{if $smarty.get.mode eq "subscribed"} {include file="main/subscribe_confirmation.tpl"} {elseif $main eq "about_us"} {include file="main/about_us.tpl"} {elseif $main eq "events"} {include file="events.tpl"} {elseif $smarty.get.mode eq "unsubscribed"} {include file="main/unsubscribe_confirmation.tpl"} {elseif $main eq "search"} {include file="customer/main/search_result.tpl"} {elseif $main eq "advanced_search"} {include file="customer/main/advanced_search.tpl"} {elseif $main eq "cart"} {include file="customer/main/cart.tpl"} {elseif $main eq "wishlist"} {if $active_modules.Wishlist ne ""} {include file="modules/Wishlist/wishlist.tpl"} {/if} {elseif $main eq "anonymous_checkout"} {include file="customer/main/anonymous_checkout.tpl"} {elseif $main eq "order_message"} {include file="customer/main/order_message.tpl"} {elseif $main eq "checkout"} {include file="customer/main/checkout.tpl"} {elseif $main eq "product"} {include file="customer/main/product.tpl" product=$product} {elseif $main eq "giftcert"} {include file="modules/Gift_Certificates/giftcert.tpl"} {elseif $main eq "subscriptions"} {include file="modules/Subscriptions/subscriptions.tpl"} {elseif $main eq "catalog" and $current_category.category eq ""} {include file="customer/main/welcome.tpl" f_products=$f_products} {elseif $main eq "catalog"} {include file="customer/main/subcategories.tpl"} {else} {include file="common_templates.tpl"} {/if}

And finally my newmenu.tpl code:

Code:
{* $Id: newmenu.tpl,v 1.4 2002/08/20 13:16:29 zorg Exp $ *} <center> [img]{$ImagesDir}/register.gif[/img] <a href="home.php?mode=events">[img]{$ImagesDir}/viewpics.gif[/img] [img]{$ImagesDir}/aboutphoto.gif[/img] [img]{$ImagesDir}/presarioproductions.gif[/img] [img]{$ImagesDir}/contactus.gif[/img] </center>

I am lost to what i am doing wrong, HELP PLEASE!!!!!
Reply With Quote
  #2  
Old 04-01-2003, 04:59 PM
 
ahunte ahunte is offline
 

Newbie
  
Join Date: Mar 2003
Posts: 3
 

Default Correction

when I said home_tpl I meant home_main.tpl

HELP!

Thanks!
Reply With Quote
  #3  
Old 04-04-2003, 06:50 PM
 
ahunte ahunte is offline
 

Newbie
  
Join Date: Mar 2003
Posts: 3
 

Default

I got it working, thanks to funkydunk. It seems like to link to the categories.tpl to make it load in the home.tpl area, you must change some of the smarty code. Below is the solution he gave me for future reference...

From: funkydunk
To: ahunte
Posted: Fri Apr 04, 2003 6:07 pm
Subject: Re: HELP please!
okay...here goes.

first create a mirror copy of customer/home.php calling it catlist.php

then amend the line that is :
$smarty->assign("main","catalog");

to
$smarty->assign("main","catlist");

then change the link to catlist.php

job done
Reply With Quote
  #4  
Old 04-05-2003, 10:00 AM
 
John7 John7 is offline
 

Senior Member
  
Join Date: Jan 2003
Posts: 136
 

Default I have a question.

I have a question.

Why not just create the categories that you need.

Past the image buttons you need into customer/home.tpl

Right click on the dynamic links and copy shortcut.

Right click on the image buttons and hyperlink then with the link you copied. Do that for each one.

Then comment out the code that displays the categories in the side menu in the home.tpl?

Seems easier than creating more templates just to display buttons.

What do you think?

John7
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 07:10 AM.

   

 
X-Cart forums © 2001-2020