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

Fake Real Static HTML Product Pages

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #11  
Old 04-07-2004, 06:23 PM
 
xcell67 xcell67 is offline
 

Senior Member
  
Join Date: Dec 2003
Posts: 149
 

Default

Hi Jon,
after typing PWD, this is the path that I am in:

/var/www/html/store/

store is my main folder that holds all the xcart files including the customer folder

when I FTP into my customer folder, there is no "product" folder that exists but there is product.php but I doubt that the SSH session is picking up on that file.

I also tried to go into the directory

/var/www/html/store/customer/

and typing ln staticproduct.php product

this creates a file, not a folder called product in my customer folder but typing http://www.mysite.com/product/290/ still gets me a 404 not found message.

By the way, I also used

/var/www/html/store/ as the /full/path/to/files to edit the pages.
Reply With Quote
  #12  
Old 04-07-2004, 06:57 PM
  Jon's Avatar 
Jon Jon is offline
 

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

Default

Sounds like the product file (it should look like a file) is located in:
/var/www/html/store/

If that's the case, you'll need to use:

http://www.mysite.com/store/product/290/
Reply With Quote
  #13  
Old 04-08-2004, 01:57 AM
 
xcell67 xcell67 is offline
 

Senior Member
  
Join Date: Dec 2003
Posts: 149
 

Default

Yup, It WORKS!

not putting the "store" in the address was the evil little problem.

Now that I got this to work, I have one last question to ask, with this, would there still be a need to create the html catalog?
Reply With Quote
  #14  
Old 04-08-2004, 09:50 AM
  Jon's Avatar 
Jon Jon is offline
 

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

Default

I don't see the need to use the HTML catalog, however I'm using an x-cart version pre-html catalog, so I don't know a lot about how it works.

What I've done instead, is edit my template files to use these static links anywhere a product is linked - The product templates, the best sellers list, upselling templates, etc., etc.

Then I created php files for my categories: http://forum.x-cart.com/viewtopic.php?t=9313&highlight=

And now the majority of the store appears static. A benefit about this also, is that you don't have duplication in your store, you don't have to do any re-compiling, etc.
Reply With Quote
  #15  
Old 04-08-2004, 02:53 PM
 
xcell67 xcell67 is offline
 

Senior Member
  
Join Date: Dec 2003
Posts: 149
 

Default

Correct me if I'm wrong, but I think it is redundant to use this mod along with the html catalog. The advantage of this mod is not having to recompile all the time, but the advantage of the html catalog is less pressure on your site because the customer browses the html catalog and doesn't enter php until they checkout. Or am I missing something, and they both can coexist?

Also, do you have to do this process for each category or put them all in one file?

1) Use an .htaccess file to parse .html as php.

2) Create a category1.html

3) In category1.html put:

Code:

<?
$cat = "1";
include "./home.php";
?>
Reply With Quote
  #16  
Old 04-08-2004, 02:58 PM
  Jon's Avatar 
Jon Jon is offline
 

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

Default

I've never used the HTML catalog, so perhaps somebody who has could elaborate on the strengths and weaknesses of each approach and how they would or wouldn't co-exist.

You'd only have create the .htaccess file once, and repeat the other two steps for each category.

Or you could create a category_name.php and just put in:

<?
$cat = "1";
include "./home.php";
?>

And repeat that for each category.
Reply With Quote
  #17  
Old 06-17-2004, 05:13 AM
 
cmtrade cmtrade is offline
 

Advanced Member
  
Join Date: Dec 2003
Location: Florida
Posts: 30
 

Default

Anyone did it for version 3.5.8 yet?

Thanks,
Dan.
Reply With Quote
  #18  
Old 06-17-2004, 08:35 AM
  Jon's Avatar 
Jon Jon is offline
 

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

Default

I've installed 3.5.8 and am studying the code.

Unless you DON'T plan on upgrading your cart, probably best only to use this mod on pre-catalog carts.

For carts with the catalog, I would suggest just building your catalog to your root httpdocs directory (below the customer directory) and setting up a cron job to build the catalog a couple times daily.
Reply With Quote
  #19  
Old 07-06-2004, 01:24 AM
 
Alan Alan is offline
 

Advanced Member
  
Join Date: Feb 2003
Posts: 83
 

Default

Greetings,

Thank you so much for contributing to us x-carters with this masterpiece.

I do have 1 question, and that is how you allow spiders to index your search frienly pages? Do you write out a whole lists of URLs in your robots.txt for them to crawl? As your "Product" folder is only a symbolic file, I wouldn't be able to put any files in there such as search_friendly_words.html

As some of us have stores that enables/disables products daily, keeping an uptodate list is tedious as well. I guess I want to say that, how do you let the Search Engines knows that you have these pages? Or is this only useful in your store itself that you can add a couple of html pages in your subcategories.tpl, instead of being product.php?
__________________
Best Regards!
Alan
Search is my friend
Reply With Quote
  #20  
Old 07-06-2004, 08:42 AM
  Jon's Avatar 
Jon Jon is offline
 

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

Default

What I did, was edit my category links, so that they were php files by using code like this:

Code:
<? $cat = "15"; include "./home.php"; ?>

I then edited the categories.tpl to include these.

I then edited all of my product links, including my products.tpl, best sellers list, etc., etc., to change product links to something like this:

Code:
<a href="/product/{$products[list].productid}/{$products[list].product|replace:" ":"_"}.html">

This creates a link to the product using the product title as the file name.

I also created a full page product listing, that grabs all of the enabled products, and lists them on 1 page, with links to their static pages, and put a link to that page on the index page. Most important thing to remember, is not to have your index page as a redirect.

Doing this we've had success with search engine spiders.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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 08:34 AM.

   

 
X-Cart forums © 2001-2020