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

What does this code in home.tpl do?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-31-2007, 05:40 AM
 
plezaic plezaic is offline
 

Advanced Member
  
Join Date: Jan 2007
Posts: 38
 

Default What does this code in home.tpl do?

I cut all this code out from home.tpl. Couldn't really figure out what exactly it does but it all seems to be in the top gray bar I wanted to remove. Any info on what all this is and what does it have to do with Checkout since my checkout seems to be just fine without this?

Thanks,
Predrag

Code:
<table cellpadding="0" cellspacing="0" width="100%"> {if $main ne "fast_lane_checkout"} <tr> <td class="HeadLine" height="22">&nbsp; </td> <td class="HeadLine" align="right">&nbsp; </td> </tr> {else} {* Fast Lane Checkout page *} <tr> <td colspan="2" class="HeadLine"> <form action="{$xcart_web_dir}/include/login.php" method="post" name="toploginform"> <input type="hidden" name="mode" value="logout" /> <input type="hidden" name="redirect" value="{$redirect}" /> <table cellpadding="0" cellspacing="0" width="100%"> <tr> <td class="FLCAuthPreBox"> <img src="{$ImagesDir}/spacer.gif" class="Spc" alt="" /> </td> {if $login ne ""} <td align="right" nowrap="nowrap"><b>{$userinfo.firstname} {$userinfo.lastname}</b> {$lng.txt_logged_in}</td> <td class="FLCAuthBox"> {if $js_enabled} {include file="buttons/button.tpl" button_title=$lng.lbl_logoff href="javascript: document.toploginform.submit();" js_to_href="Y"} {else} {include file="buttons/logout_menu.tpl"} {/if} </td> {/if} </tr> </table> </form> </td> </tr> {/if} {if $main ne "fast_lane_checkout"} <tr> <td colspan="2" valign="middle" height="32"> <table cellspacing="0" cellpadding="0" width="100%"> <tr> <td class="HeadTopPad"><img src="{$ImagesDir}/spacer.gif" alt="" /></td> {if (($main eq 'catalog' && $cat ne '') || $main eq 'product' || ($main eq 'comparison' && $mode eq 'compare_table') || ($main eq 'choosing' && $smarty.get.mode eq 'choose')) && $config.Appearance.enabled_printable_version eq 'Y'} <td class="PrintableRow" align="right">{include file="printable.tpl"}</td> {/if} </tr> </table> </td> </tr> {else} {* Fast Lane Checkout page *} <tr> <td colspan="2" class="FLCTopPad"><img src="{$ImagesDir}/spacer.gif" alt="" /></td> </tr> {/if} </table>
__________________
X-Cart Gold 4.1.10
X-AOM
BCSE-POS
Reply With Quote
  #2  
Old 01-31-2007, 05:46 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: What does this code in home.tpl do?

That is all related to the fast lane checkout module. FYI, you should never cut code out completely until you are sure about what it does. Always safe to comment it out first:

{* commented out code *}
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 01-31-2007, 05:50 AM
 
plezaic plezaic is offline
 

Advanced Member
  
Join Date: Jan 2007
Posts: 38
 

Default Re: What does this code in home.tpl do?

Related to fast checkout in what way since home.tpl is not even called after I click on checkout link in the cart?

Cart seems to work fine without that code. It is commented out.

Thanks,
Predrag
__________________
X-Cart Gold 4.1.10
X-AOM
BCSE-POS
Reply With Quote
  #4  
Old 01-31-2007, 05:53 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: What does this code in home.tpl do?

Sorry, now that look at it closer it contains the 'user is logged in' text ,as well as the printable page icon for NON fast-lane checkout pages.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 01-31-2007, 05:57 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: What does this code in home.tpl do?

As Padraic siad, this is all related to Fast Lane Checkout. If you do not have FLC enabled, this code will nt be involved, BUT there is no harm to leave it in -- becasue if in the future, you should decide to use FLC (I do, I like it), and you want to update your version, without the code, upgrades will be even more of a mess.

Why do you need to cut this out?

You can modify the look by going into the CSS... Be careful -- you are messing with the checkout - this is mission critical stuff here. If you read the code, you'll see what it's doing... not too many ifs... you shold be able to modify the CSS to do what you want.

Good luck.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #6  
Old 01-31-2007, 06:07 AM
 
plezaic plezaic is offline
 

Advanced Member
  
Join Date: Jan 2007
Posts: 38
 

Default Re: What does this code in home.tpl do?

I compromised doing these modifications. It takes out lines, grey background and Search.

Code:
<table cellpadding="0" cellspacing="0" width="100%"> {if $main ne "fast_lane_checkout"} <tr> <td height="22"> {* {if $usertype eq "C"} { include file="customer/search.tpl" } {/if} *} &nbsp; </td> <td align="right"> {if ($usertype eq "C" || $usertype eq "B") && $all_languages_cnt gt 1} <form action="home.php" method="get" name="sl_form"> <input type="hidden" name="redirect" value="{$smarty.server.PHP_SELF}?{$smarty.server.QUERY_STRING|amp}" /> <table cellpadding="0" cellspacing="0"> <tr> <td style="padding-right: 5px;"><b>{$lng.lbl_select_language}:</b></td> <td><select name="sl" onchange="javascript: this.form.submit();"> {section name=ai loop=$all_languages} <option value="{$all_languages[ai].code}"{if $store_language eq $all_languages[ai].code} selected="selected"{/if}>{$all_languages[ai].language}</option> {/section} </select></td> </tr> </table> </form> {else} &nbsp; {/if} </td> </tr> {else} {* Fast Lane Checkout page *} <tr> <td colspan="2"> <form action="{$xcart_web_dir}/include/login.php" method="post" name="toploginform"> <input type="hidden" name="mode" value="logout" /> <input type="hidden" name="redirect" value="{$redirect}" /> <table cellpadding="0" cellspacing="0" width="100%"> <tr> <td class="FLCAuthPreBox"> {if $active_modules.SnS_connector and $sns_collector_path_url ne '' && $config.SnS_connector.sns_display_button eq 'Y'} <img src="{$ImagesDir}/rarrow.gif" alt="" valign="middle" /><b>{include file="modules/SnS_connector/button.tpl" text_link="Y"}</b> {else} <img src="{$ImagesDir}/spacer.gif" class="Spc" alt="" /> {/if} </td> {if $login ne ""} <td align="right" nowrap="nowrap"><b>{$userinfo.firstname} {$userinfo.lastname}</b> {$lng.txt_logged_in}</td> <td class="FLCAuthBox"> {if $js_enabled} {include file="buttons/button.tpl" button_title=$lng.lbl_logoff href="javascript: document.toploginform.submit();" js_to_href="Y"} {else} {include file="buttons/logout_menu.tpl"} {/if} </td> {/if} </tr> </table> </form> </td> </tr> {/if} {if $main ne "fast_lane_checkout"} <tr> <td colspan="2" valign="middle" height="32"> <table cellspacing="0" cellpadding="0" width="100%"> <tr> <td class="HeadTopPad"><img src="{$ImagesDir}/spacer.gif" alt="" /></td> {if (($main eq 'catalog' && $cat ne '') || $main eq 'product' || ($main eq 'comparison' && $mode eq 'compare_table') || ($main eq 'choosing' && $smarty.get.mode eq 'choose')) && $config.Appearance.enabled_printable_version eq 'Y'} <td class="PrintableRow" align="right">{include file="printable.tpl"}</td> {/if} </tr> </table> </td> </tr> {else} {* Fast Lane Checkout page *} <tr> <td colspan="2" class="FLCTopPad"><img src="{$ImagesDir}/spacer.gif" alt="" /></td> </tr> {/if} </table>
__________________
X-Cart Gold 4.1.10
X-AOM
BCSE-POS
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:37 PM.

   

 
X-Cart forums © 2001-2020