X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Fake Real Static HTML Product Pages (https://forum.x-cart.com/showthread.php?t=6826)

xcell67 04-07-2004 06:23 PM

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.

Jon 04-07-2004 06:57 PM

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/

xcell67 04-08-2004 01:57 AM

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?

Jon 04-08-2004 09:50 AM

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.

xcell67 04-08-2004 02:53 PM

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";
?>

Jon 04-08-2004 02:58 PM

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.

cmtrade 06-17-2004 05:13 AM

Anyone did it for version 3.5.8 yet?

Thanks,
Dan.

Jon 06-17-2004 08:35 AM

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.

Alan 07-06-2004 01:24 AM

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?

Jon 07-06-2004 08:42 AM

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.


All times are GMT -8. The time now is 06:19 PM.

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