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

Jon 09-28-2004 06:57 AM

^ To the best of my knowledge yes.

lildawg 09-28-2004 08:11 AM

I am not so sure about that. As in one of my sites in the root I use an index.php file that redirects the customer to the cart. I only have around 2000 products and google has 4040 links to my site they have both the php version indexed as well as the catalog/html version. It is more of a penalty if you redirect your customer from your domain to another domain and are just using a site as a doorway to your other site. As long as it is staying in the same url it appears you are fine. At least with my 60 websites I have never had a problem with it. Just my opinion though I could be wrong but as said I do not seem to have been penalized for it and have been doing it for a couple of years now.

Jon 09-28-2004 09:56 AM

^ Isn't it possible though that they are indexing those pages by coming to a different page and spidering through, and not working off your index redirect?

coneme 09-28-2004 05:00 PM

safe php redirect
 
Hi,

I think I might have found an answer...

http://www.searchenginepromotionhelp.com/m/articles/search-engine-problems/url-redirect-safe.php


It seems that a 301 (Permanent redirect) is the only safe redirect that Google won't penalise.

Thanks for your replies

TelaFirma 09-28-2004 05:17 PM

Using a meta refresh or a header redirect generates a 302 error code. A 302 is a temporary redirect and some search engines do not like that.

The reason that they do not like it is that it is a common thing for people to do to try to get better listings. They will register multiple domain names, create redirect pages to one single site and then register all the domain names with the search. Google "frowns" on this.

What you should have your site do is generate a 301 code for a redirect. This is a permanent redirect. The best way to do this is through the .htaccess file. You should create entries like this:

Code:

Redirect permanent /index.html http://www.yoursite.com/catalog/index.html

Redirect permanent /index.php http://www.yoursite.com/catalog/index.html

Redirect permanent /index.htm http://www.yoursite.com/catalog/index.html 



This assumes that this is the path to your catalog. It also covers all three instances of standard index pages that are configured with *NIX servers.

It is important that you precede each listing with Redirect permanent and not just Redirect. The former generates a 301 code and the later will still generate a 302 code.


All times are GMT -8. The time now is 07:32 AM.

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