| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Fake Real Static HTML Product Pages | ||||
|
|
Thread Tools | Search this Thread |
#11
|
|||||||
|
|||||||
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. |
|||||||
#12
|
|||||||||
|
|||||||||
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/ |
|||||||||
#13
|
|||||||
|
|||||||
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? |
|||||||
#14
|
|||||||||
|
|||||||||
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. |
|||||||||
#15
|
|||||||
|
|||||||
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"; ?> |
|||||||
#16
|
|||||||||
|
|||||||||
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. |
|||||||||
#17
|
|||||||
|
|||||||
Anyone did it for version 3.5.8 yet?
Thanks, Dan. |
|||||||
#18
|
|||||||||
|
|||||||||
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. |
|||||||||
#19
|
|||||||
|
|||||||
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 |
|||||||
#20
|
|||||||||
|
|||||||||
What I did, was edit my category links, so that they were php files by using code like this:
Code:
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:
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. |
|||||||||
|
|||
X-Cart forums © 2001-2020
|