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

Using Your Own Page Instead Of customer/home.php

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-28-2004, 09:17 AM
  frankdux's Avatar 
frankdux frankdux is offline
 

Senior Member
  
Join Date: Jul 2004
Location: Manchester, NH, USA
Posts: 125
 

Default 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.
__________________
X-Cart: 4.0.18
Linux, Apache, MySQL: 4.1.16, PHP: 4.4.2
Reply With Quote
  #2  
Old 08-30-2004, 11:56 PM
 
szheli szheli is offline
 

Member
  
Join Date: Aug 2004
Posts: 24
 

Default 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.
__________________
x-cart gold 3.5.11
Reply With Quote
  #3  
Old 08-31-2004, 10:47 AM
  frankdux's Avatar 
frankdux frankdux is offline
 

Senior Member
  
Join Date: Jul 2004
Location: Manchester, NH, USA
Posts: 125
 

Default

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.
__________________
X-Cart: 4.0.18
Linux, Apache, MySQL: 4.1.16, PHP: 4.4.2
Reply With Quote
  #4  
Old 08-31-2004, 11:10 AM
  lyncca's Avatar 
lyncca lyncca is offline
 

X-Adept
  
Join Date: Nov 2003
Location: Fort Worth, Texas
Posts: 455
 

Default

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.
Reply With Quote
  #5  
Old 08-31-2004, 11:52 AM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default

^ I'd do that.
Reply With Quote
  #6  
Old 08-31-2004, 01:01 PM
  frankdux's Avatar 
frankdux frankdux is offline
 

Senior Member
  
Join Date: Jul 2004
Location: Manchester, NH, USA
Posts: 125
 

Default

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.
__________________
X-Cart: 4.0.18
Linux, Apache, MySQL: 4.1.16, PHP: 4.4.2
Reply With Quote
  #7  
Old 08-31-2004, 01:06 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default

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; } ?>
Reply With Quote
  #8  
Old 08-31-2004, 01:08 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default

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
Reply With Quote
  #9  
Old 09-06-2004, 06:49 AM
  frankdux's Avatar 
frankdux frankdux is offline
 

Senior Member
  
Join Date: Jul 2004
Location: Manchester, NH, USA
Posts: 125
 

Default

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";
__________________
X-Cart: 4.0.18
Linux, Apache, MySQL: 4.1.16, PHP: 4.4.2
Reply With Quote
  #10  
Old 09-27-2004, 07:25 PM
 
coneme coneme is offline
 

Member
  
Join Date: Feb 2004
Posts: 14
 

Default

Jon

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

Thanks
coneme
__________________
xcart 3.5.10 [unix]
PHP 4.3.8
MySQL 4.0.20
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 07:23 AM.

   

 
X-Cart forums © 2001-2020