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)
-   -   How about an alternative home.php for integrating xCart/non-xCart? (https://forum.x-cart.com/showthread.php?t=25898)

fogelka 10-17-2006 08:59 PM

How about an alternative home.php for integrating xCart/non-xCart?
 
I've been taking bits and pieces from different threads, and creating what seems almost like a Frankenstein monster. Now, I have run into a wall, and can't finish. So far...

Within home.tpl, I have succeeded in eliminating all xCart content below the header, and inserting a "entry.tpl" home page there. This is by placing this before the tables in home.tpl :

{if $main eq "catalog" and $current_category.category eq ""}
{include file="entry.tpl"}
{else}

I have moved and re-formatted the authbox into the header, so I still have an active page for logging in, etc. I also have pulldowns in the header, which link to the xCart categories. That works great.

Here's where I'm stuck. I cannot find a way to bring other non-xCart pages into home.tpl to replace "entry.tpl", while keeping the active header, and no xCart stuff below. I've tried $menu ideas, and several other things. Is there a way to have an alternative home.tpl or create an "entry.php" that I can use as a non-xcart alternative to home.php? I thought I could set $main there, as, say, $smarty assign->("main", "content"), and go from there.

Please help, if you can! (I've been on this for days on end.) Thanks!

Jon 10-17-2006 10:18 PM

Re: How about an alternative home.php for integrating xCart/non-xCart?
 
You can create an entry page using index.php. Create a new index.php with this content:

Code:

<?php
require "./auth.php";
func_display("customer/entry.tpl",$smarty);
?>


Then create a skin1/customer/entry.tpl file and put whatever you want in it.

fogelka 10-18-2006 09:45 PM

Re: How about an alternative home.php for integrating xCart/non-xCart?
 
Thanks again, Jon. With your help I was able to get the non-xCart page integrated correctly.

In doing so, I also finally realized what I needed to do to pull all the other non-cart pages in. I simply created a new "index.php" , a new "index.tpl", and a new "index_main.tpl". Then, I used them just like the home.php, home.tpl, and home_main.tpl for xCart. Only this way, I could have whatever formats, content, etc. I wanted in the main section, and no xCart stuff. Everything links back and forth seamlessly.

The nice thing is that the entire site is tied together very nicely by the similar (though different) header, which is active in both sides of the site. I have the "authbox" reformatted and re-laid out, and pulled into the header, along with pulldowns for the categories. That way, throughout all of the xCart and non-xCart pages, there is a consistent log-in/log-out, plus you can jump to a product at any time.

I'm nearly home now! Thanks again.

Jon 10-19-2006 06:24 AM

Re: How about an alternative home.php for integrating xCart/non-xCart?
 
Glad to hear :)


All times are GMT -8. The time now is 02:51 PM.

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