X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   What does this code in home.tpl do? (https://forum.x-cart.com/showthread.php?t=28459)

plezaic 01-31-2007 05:40 AM

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>


balinor 01-31-2007 05:46 AM

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 *}

plezaic 01-31-2007 05:50 AM

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

balinor 01-31-2007 05:53 AM

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.

carpeperdiem 01-31-2007 05:57 AM

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.

plezaic 01-31-2007 06:07 AM

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>



All times are GMT -8. The time now is 03:23 PM.

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