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

Custom template for homepage or index page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-16-2007, 01:09 AM
 
rnisc rnisc is offline
 

Newbie
  
Join Date: Jan 2007
Location: Malaysia
Posts: 8
 

Default Custom template for homepage or index page

Is it possible to create a different layout for homepage or index page? I would like to have a clean layout on homepage but there will be some similar functions as the store pages like mini cart, categories and manufacturers. For example, the customers may see a big banner on the homepage and when they click on the banner, they will be redirected to the standard store pages.
__________________
- version 4.1.6 pro -
Reply With Quote
  #2  
Old 02-16-2007, 03:23 AM
 
balinor balinor is offline
 

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

Default Re: Custom template for homepage or index page

What you are looking for is a 'splash' page, which exists by default in X-Cart as index.html. It is not recommended for Search Engine Optimization though.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 02-16-2007, 04:21 AM
 
rnisc rnisc is offline
 

Newbie
  
Join Date: Jan 2007
Location: Malaysia
Posts: 8
 

Default Re: Custom template for homepage or index page

Thanks for the reply. I know about the index.html file, but I'm looking a way to create a dynamic index/home page which can contains some of the cart features. Could if be possible to modify the home.tpl using the if/else conditions? I need the manufacturers and categories module as well as the mini cart on homepage.

I just bought X-Cart for my client and still play around with it. It's just a lot of tables to create layouts with css which I found confusing - need to be careful to edit. I mean, creating layouts using div tag is much better and more systematic. I work with other carts before and those are much easier to customise. But X-Cart is great with multi-vendor feature.

__________________
- version 4.1.6 pro -
Reply With Quote
  #4  
Old 02-16-2007, 05:51 AM
 
carpeperdiem carpeperdiem is offline
 

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

Default Re: Custom template for homepage or index page

It's quite simple. The easiest way is to preserve your store formatting (header, footer, nav menus) and basically put "something else" into your homepage:

1. In /skin1/customer/home_main.tpl

FIND:
Code:
{elseif $main eq "catalog" and $current_category.category eq ""} {include file="customer/main/welcome.tpl" f_products=$f_products}
REPLACE WITH:
Code:
{elseif $main eq "catalog" and $current_category.category eq ""} {include file="customer/main/new_homepage.tpl"} {* {include file="customer/main/welcome.tpl" f_products=$f_products} *}

2. Make your new homepage (call it new_homepage.tpl or whatever you want).

Now, by doing it this way, you still have 100% of your smarty vars and you can basically make anything you want (and you preserve your store's consistent look and feel)

You will be giving up welcome.tpl and all the junk it comes with (this is usually a good thing).

Use welcome.tpl as a guide -- but you can now make something that is visually unique and specific to your store.

PS -- I agree with Padraic: "splash pages" are Very Bad (and only slow your visitor down) -- unless you are selling image... but for shoppers, it's hard to justify a splash page.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #5  
Old 02-16-2007, 05:54 AM
 
carpeperdiem carpeperdiem is offline
 

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

Default Re: Custom template for homepage or index page

that should have read:

1. in /skin1/customer/home_main.tpl
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 12:11 PM.

   

 
X-Cart forums © 2001-2020