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

Cusotm homepage

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-27-2010, 05:22 AM
  FTI's Avatar 
FTI FTI is offline
 

Senior Member
  
Join Date: Oct 2009
Location: Plovdiv, Bulgaria
Posts: 153
 

Question Cusotm homepage

I want to make a custom homepage. On the homepage, I want only header, minicart ad login panel and only a few images, like this one:

http://www.lancome.co.uk/_en/_gb/

But when I hide all the pannels in the home.tpl, they disappear on the other pages, too. I want a home page like the one on the link and standart light & lucid 3 columns view on all other pages. Which file to edit to remove everything in the #left-bar, #right-bar and #center only on the frontpage and keep them on all other pages. Please help...
__________________
Version 4.2.3
X-Cart Gold

Version 4.3.1
X-Cart Gold
Reply With Quote
  #2  
Old 04-27-2010, 06:54 AM
  pauldodman's Avatar 
pauldodman pauldodman is offline
 

X-Guru
  
Join Date: Jul 2003
Location: Spain / UK
Posts: 3,052
 

Default Re: Cusotm homepage

You are in the right template, but you need to surround the include statements for the menus with an if statement:

{if $main neq "catalog" || $current_category.category neq ""}

If you use that, the pannels will appear on all pages but the home page.
__________________
Paul Dodman
e-business & m-commerce consultant
w: www.luminointernet.com
e: xcart@luminointernet.com

Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart.
Reply With Quote

The following user thanks pauldodman for this useful post:
FTI (04-28-2010)
  #3  
Old 04-28-2010, 12:30 AM
  FTI's Avatar 
FTI FTI is offline
 

Senior Member
  
Join Date: Oct 2009
Location: Plovdiv, Bulgaria
Posts: 153
 

Default Re: Cusotm homepage

Thanks, I figured it out.
__________________
Version 4.2.3
X-Cart Gold

Version 4.3.1
X-Cart Gold
Reply With Quote
  #4  
Old 04-28-2010, 05:24 PM
 
cosy cosy is offline
 

Advanced Member
  
Join Date: Mar 2009
Posts: 79
 

Default Re: Cusotm homepage

Thanks for that infrmation what i can not figureout is

"when I hide all the pannels in the home.tpl, they disappear on the other pages, too. I want a home page like the one on the link and standart 3 columns view on all other pages.
remove everything in the #left-bar, #right-bar and #center only on the frontpage and keep them on all other pages. "

This is my home.tpl pls see you can help me?

<div id="main_container" style="width:{if $config.Smart_Template.st_col_layout_type eq "Fixed"}{$config.Smart_Template.st_col_layout_widt h}px{else}100%{/if}">
<!-- ************************************************** ********************************** -->
{include file="custom/header_`$config.Smart_Template.st_col_header_type` .tpl}
<!-- ************************************************** ********************************** -->
<div class="colmask">
<div class="colmid">
<div class="colright">
<div class="col1wrap">
<div class="col1pad">
<div class="col1">
<div class="colpad_body">
<!-- Column 1 start -->

{if $main neq "catalog" || $current_category.category neq ""}
{include file="customer/bread_crumbs.tpl"}
{/if}

{if $config.Smart_Template.st_show_ie6_warning eq "Y"}
{include file="custom/ie6_upgrade.tpl"}
{/if}
{if $gcheckout_enabled && $main ne "cart" && $main ne "checkout" && $main ne "anonymous_checkout" && $main ne "order_message"}
{include file="modules/Google_Checkout/gcheckout_top_button.tpl"}
{/if}
{include file="customer/evaluation.tpl"}
{include file="customer/dialog_message.tpl"}
{if $page_title}
<h1>{$page_title|escape}</h1>
{/if}
{if $active_modules.Special_Offers}
{include file="modules/Special_Offers/customer/new_offers_message.tpl"}
{/if}
{include file="customer/home_main.tpl"}
{include file="customer/printable_link.tpl"}
<!-- Column 1 end -->
</div>
</div>
</div>
</div>
<div class="col2">
<div class="colpad">
<!-- Column 2 start -->
{if $categories && ($active_modules.Flyout_Menus || $config.General.root_categories eq "Y" || $subcategories)}
{include file="customer/categories.tpl" }
{/if}
{if $active_modules.Bestsellers}
{include file="modules/Bestsellers/menu_bestsellers.tpl" }
{/if}
{if $active_modules.Manufacturers ne "" and $config.Manufacturers.manufacturers_menu eq "Y"}
{include file="modules/Manufacturers/menu_manufacturers.tpl" }
{/if}
{include file="customer/special.tpl"}
{if $active_modules.Survey && $menu_surveys}
{foreach from=$menu_surveys item=menu_survey}
{include file="modules/Survey/menu_survey.tpl"}
{/foreach}
{/if}

<!-- Column 2 end -->
</div>
</div>
<div class="col3">
<div class="colpad">
<!-- Column 3 start -->
{include file="customer/language_selector.tpl"}
{if $active_modules.SnS_connector}
{include file="modules/SnS_connector/button.tpl"}
{/if}
{if $active_modules.Feature_Comparison && $comparison_products ne ''}
{include file="modules/Feature_Comparison/product_list.tpl" }
{/if}
{include file="customer/menu_cart.tpl" }
{if $config.Smart_Template.st_use_my_account ne "Y"}
{if $login eq "" }
{include file="customer/auth.tpl" }
{else}
{include file="customer/authbox.tpl" }
{/if}
{/if}
{include file="customer/news.tpl" }
{* Recently Viewed *}
{include file="customer/recent.tpl"}
{* /Recently Viewed *}
{include file="customer/help/menu.tpl"}
{if $active_modules.XAffiliate && $config.XAffiliate.partner_register eq 'Y' && $config.XAffiliate.display_backoffice_link eq 'Y'}
{include file="partner/menu_affiliate.tpl" }
{/if}
{if $active_modules.Interneka}
{include file="modules/Interneka/menu_interneka.tpl" }
{/if}
{if $active_modules.Users_online}
{include file="modules/Users_online/menu_users_online.tpl"}
{/if}
<!-- Column 3 end -->
</div>
</div>
</div>
</div>
</div>
<div class="clearing"></div>
<!-- ************************************************** ********************************** -->
{include file="custom/footer.tpl}
<!-- ************************************************** ********************************** -->
{if $config.Smart_Template.st_use_my_account eq "Y"}
{include file="custom/modules/my_account/my_account.tpl"}
{/if}
</div><!-- /maincontainer -->
{if $config.Smart_Template.st_use_cufon eq "Y"}
<script type="text/javascript" src="{$SkinDir}/custom/modules/cufon/render_cufon.js"></script>
{/if}
[/font]
__________________
Version 4.2.0
Testing v 4.4
Reply With Quote
  #5  
Old 04-29-2010, 02:12 AM
 
cosy cosy is offline
 

Advanced Member
  
Join Date: Mar 2009
Posts: 79
 

Default Re: Cusotm homepage

Quote:
Originally Posted by pauldodman
You are in the right template, but you need to surround the include statements for the menus with an if statement:

{if $main neq "catalog" || $current_category.category neq ""}

If you use that, the pannels will appear on all pages but the home page.


i got that but still showin in the home page?
__________________
Version 4.2.0
Testing v 4.4
Reply With Quote
  #6  
Old 04-29-2010, 11:28 AM
  gb2world's Avatar 
gb2world gb2world is offline
 

X-Wizard
  
Join Date: May 2006
Location: Austin, TX
Posts: 1,970
 

Default Re: Cusotm homepage

Try debugging until you figure out how it works - you can enter code in home.tpl and see the values of the variables and understand why things are showing and not showing:

Code:
<p>Here is my debug code:<br /> main: {$main}<br /> current category: {$current_category.category} </p> {if $main eq "catalog" && $current_category.category eq ""} <p>This should display only on the home page</p> {else} <p>This should display on other pages</p> {/if}

Look at skin1/customer/home_main.tpl - it will give you an idea of what value to test for in $main for various pages.
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold
(CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module)
Reply With Quote
  #7  
Old 05-01-2010, 05:44 AM
  FTI's Avatar 
FTI FTI is offline
 

Senior Member
  
Join Date: Oct 2009
Location: Plovdiv, Bulgaria
Posts: 153
 

Default Re: Cusotm homepage

Hi cosy,

If you want to hide included file only on the homepage you go like this:

Code:
{if $main neq "catalog" || $current_category.category neq "" and ($main ne "catalog" or $cat ne "")} {include file="customer/bread_crumbs.tpl"} {/if}

You can replace the string in red with any included file you want.

If you want to hide a module only on the homepage you go like this:

Code:
{if $active_modules.Bestsellers and ($main ne "catalog" or $cat ne "")} {include file="modules/Bestsellers/menu_bestsellers.tpl" } {/if}


The only file you need to edit is: skin1/customer/home.tpl

Thats everything I did and it works for me

Take care!
__________________
Version 4.2.3
X-Cart Gold

Version 4.3.1
X-Cart Gold
Reply With Quote

The following 2 users thank FTI for this useful post:
kevfromwiganinlancashire (05-01-2010), monarchmdm (09-16-2010)
  #8  
Old 05-01-2010, 05:52 AM
  kevfromwiganinlancashire's Avatar 
kevfromwiganinlancashire kevfromwiganinlancashire is offline
 

X-Adept
  
Join Date: Nov 2004
Location: Appley Bridge
Posts: 563
 

Default Re: Cusotm homepage

Thanks FTI, good to know

Kev
__________________
Php 5.4.16-36.el7_1
MySQL 5.5.41-2.el7_0
Apache
2.4.6-31.el7.centos



4.6.x stalled for now

5.2.6 developing
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:12 AM.

   

 
X-Cart forums © 2001-2020