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

What controls which templates get loaded?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 12-30-2008, 12:14 PM
 
AMMoyer AMMoyer is offline
 

Senior Member
  
Join Date: Nov 2008
Posts: 150
 

Default What controls which templates get loaded?

I am working on a new template that is not responding like I had hoped. I have a few dropdowns located in the left menu column. After the selection is made in the first dropdown, the entire page reloads and my template is now in the main section of the page, the category template and the bestselling template are now gone.

Here is my tpl file:
Code:
{capture name=menu} <form method="post" action="mmy.php" name="mmysearchform"> <select name="year2" style="width: 80%;"onchange="javascript:document.mmysearchform.submit ();"> <option value="" selected="selected">Select Year</option> <option value="2009">2009 <option value="2008">2008 <option value="2007">2007 <option value="2006">2006 <option value="2005">2005 <option value="2004">2004 </select><br> <select name="make" style="width: 80%;"onchange="javascript:document.mmysearchform.submit ();"> <option value"" selected="selected">Select Make</option> {foreach item=row from=$row} <option value="{$row.makeid}">{$row.makename}</option> {/foreach} </select><br> <select name="model" style="width: 80%;"onchange="javascript:document.mmysearchform.submit ();"> <option value="" selected="selected">Select Model</option> </select> </form> <font class="CategoriesList"><a href="home.php?cat=" class="VertMenuItems"></a></font><br /> <font class="CategoriesList"><a href="home.php?cat=" class="VertMenuItems"></a></font><br /> {/capture} { include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_mmy_search menu_content=$smarty.capture.menu cellpadding=$fc_cellpadding}

PHP file
Code:
<?php require "./auth.php"; $year = $_POST['year2']; $query = sprintf("SELECT DISTINCT makeid, makename FROM iemmy WHERE yearid='$year'"); $result = @mysql_query($query); while ($row = mysql_fetch_assoc($result)) { $makeid[] = $row['makeid']; $makename[] = $row['makename']; } $smarty->assign("makeid", $makeid); $smarty->assign("makename", $makename); $smarty->assign("main", "iesearch"); $smarty->assign("location", $location); func_display("customer/home.tpl",$smarty); ?>

My guess is that I need to change something that has to do with the "main" variable somewhere, but I am still looking. Also, where does the variable "location" come into play?
__________________
Adam
X-Cart Gold 4.4.5 - Live
X-Cart Gold 4.1.11 - Retired
X-Payments 1.0.4
CDSEO Pro
EWD Hosting
Reply With Quote
  #2  
Old 12-30-2008, 12:28 PM
 
AMMoyer AMMoyer is offline
 

Senior Member
  
Join Date: Nov 2008
Posts: 150
 

Default Re: What controls which templates get loaded?

I think I found one answer to a question. The variable "location" is the breadcrumb menu across the top of the main content area.
__________________
Adam
X-Cart Gold 4.4.5 - Live
X-Cart Gold 4.1.11 - Retired
X-Payments 1.0.4
CDSEO Pro
EWD Hosting
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 03:32 PM.

   

 
X-Cart forums © 2001-2020