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)
-   -   Using Your Own Page Instead Of customer/home.php (https://forum.x-cart.com/showthread.php?t=9127)

frankdux 08-28-2004 09:17 AM

Using Your Own Page Instead Of customer/home.php
 
Is there a place where you could change a path so that whenever the welcome page (customer/home.php) is supposed to load up, your own page (say your home page for example) would always load instead?

Just to be clear, I am not looking to modify the text on the welcome page (customer/home.php), I just don't want to use that page at all. I'd rather use my own home page.

szheli 08-30-2004 11:56 PM

One thought
 
You could rename X-Cart's home.php and name your file home.php...then when the page loads, it will call your file.

frankdux 08-31-2004 10:47 AM

I suppose that would work, but I don't really want to rename my homepage just to accomplish this. I was wondering if someone knew where the file was that sets "customer/home.php" as the default welcome page. If I knew that, I could just change the path to my own URL.

lyncca 08-31-2004 11:10 AM

Can you just use the index.html that is included and not redirect to the home page? I guess since I don't understand why you want to do this, I can't come up with a great suggestion.

The home.php page is referenced so much throughout the cart, I would be rather nervous about changing it.

Jon 08-31-2004 11:52 AM

^ I'd do that.

frankdux 08-31-2004 01:01 PM

Quote:

Originally Posted by lyncca
Can you just use the index.html that is included and not redirect to the home page? I guess since I don't understand why you want to do this, I can't come up with a great suggestion.
The home.php page is referenced so much throughout the cart, I would be rather nervous about changing it.



The reason I want to replace "customer/home.php" with my own home page is because I integrate X-cart with my existing HTML pages. The only X-cart generated pages are the last few pages of the checkout and I use X-cart for writing "add to cart" code to my own pages.

I don't think it would be that hard to globally change the default home/welcome page from customer/home.php to my own page. I am pretty sure the instructions for which page to use are specified in just one file, I am just having trouble locating that file.

Jon 08-31-2004 01:06 PM

Not ideal, but you could always do a redirect.

Open up customer/home.php and at the very top put:

Code:

<?
if (!$cat) { header("Location: http://www.domain.com/yourpage.html"); exit; }
?>


Jon 08-31-2004 01:08 PM

Quote:

Originally Posted by frankdux
I suppose that would work, but I don't really want to rename my homepage just to accomplish this. I was wondering if someone knew where the file was that sets "customer/home.php" as the default welcome page. If I knew that, I could just change the path to my own URL.


As far as I'm aware there is no config file that sets the default welcome file (though perhaps maybe I'm uninformed). The customer folder has an index.html file which redirects to home.php

frankdux 09-06-2004 06:49 AM

Ok, I got the answer to my original question so I'll post it here in should anyone else need it. This is actually almost the same thing Jon suggested.

If you always want customers accessing http://www.yourdomain.com/x-cart/customer/home.php to be automatically redirected to http://www.yourdomain.com you could do the following:

Edit the 'customer/home.php' script and insert the line

if(empty($QUERY_STRING)) func_header_location("http://www.yourdomain.com");

right after the line

require "./auth.php";

coneme 09-27-2004 07:25 PM

Jon

Do you know if Google penalizes the PHP redirect as an illegal page redirection?

Thanks
coneme


All times are GMT -8. The time now is 09:52 AM.

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