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)
-   -   Custom template for homepage or index page (https://forum.x-cart.com/showthread.php?t=28933)

rnisc 02-16-2007 01:09 AM

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.

balinor 02-16-2007 03:23 AM

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.

rnisc 02-16-2007 04:21 AM

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.

:D

carpeperdiem 02-16-2007 05:51 AM

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.

carpeperdiem 02-16-2007 05:54 AM

Re: Custom template for homepage or index page
 
that should have read:

1. in /skin1/customer/home_main.tpl


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

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