![]() |
Static page simulation. Search engine improvements
I wrote a mod that will generate a page which lists all products of the store with its description, simulating a static page. It makes use of Apache Rewrite Engine (mod rewrite).
A page mycatalog.html is dynamically created, and will list the products in the following way: Name of the first product Description of the first product Name of the second product Description of the second product and so forth for the whole catalog. You can see it at work in http://mascotasmexico.com/tienda/lista.html (and yes, this is dynamically created) (thanks Gijs for your help on seeing into template variables, which helped me nail this in relatively short time). 03.03.05 EDIT Please check my newest version of this mod at: http://forum.x-cart.com/viewtopic.php?p=80454#80454 These are the steps to install it (you don't need to change any of the original programs): 1. Create new template skin1/SEO_listing.tpl Code:
{* Smarty Template by Fernando Borcel. MascotasMexico.com 2004/10/31 *} 2. Create mycatalog.php on your xcart directory: Code:
<?php 3. Add the following lines to your .htaccess file on xcart directory, that will map your "html" files to the actual php scripts, without redirecting. Code:
RewriteEngine on (change the /xcart/ directory if your webdir is something else) 4. Add a link somewhere in your customer/home.tpl or wherever you feel like, that might look something like: Quote:
Ideally this should not be a hidden link, but you want to place somewhere highly unlikely for users to click on it. 03.03.05 EDIT Please check my newest version of this mod at: http://forum.x-cart.com/viewtopic.php?p=80454#80454 I'd want to hear what you think of this, and if you have any improvements for it (which I'm sure there could be), I would be more than glad to hear from you!! Regards |
Hi Fernando,
Works like a dream ... now ! First you have to check if the Rewrite module is loaded with Apache otherwise you'll get an internal server error. Check at this section: Quote:
Personnally I would add categories and thumbs as well. Nice Mod :wink: Gijs |
Good point. I'll update the mod so that it'll include all categories. I just finished a new mod so that customers will be able to see all the first-level sub-categories within the main category they're browsing. I'll post it here over the next few days ;) You can check it out @ my site.
Cheers, |
Re: Static page simulation. Search engine improvements
Quote:
I don't know what a hidden link is :?: :oops: In CSS you could do the following and ... I hope this is not what you call a hiddenlink :lol: Code:
.HiddenUrl { Match COLOR to the background colour of where you put the hyperlink (f.e. in bottom.tpl) When hoovering you'll notice the "hand cursor" showing up for the rest it will be invisible. <a class="HiddenUrl" href="mycatalog.html>Catalog</a> |
awesome mod
FYI, people using 3.5 and lower need to change func_display("SEO_listing.tpl", $smarty); to $smarty->display("SEO_listing.tpl"); in mycatalog.php for this to work. |
Very nice mod... but can this be done in even a slightly better way...
shop is on domain1.com but a page is generated on domain2.com and domain3.com etc this way the all links can be put on the back of many high rank domains... a suggestion...! maybe a xml feed? |
Hi guys;
I'm running version 3.2.2, and I don't even have HTML Catalog feature. This Mod seems can be very usable for me. Any idea if would work in this old version 3.2.2 ? Appreciate any help ! Thanks :) |
Great mod - thank you - very versatile too. How can I display it within the xcart template?
|
Hi. I actually created it with search engines in mind, so applying a template wasn't of too much use. Maybe someone else will care to comment on this?
Regards |
It's ok, I've found a way round it, thanks again.
|
Hi PhilJ,
Quote:
Cool ! Could you share this with us ? Thanks in advance Gijs |
I didn't actually manage to get it into the x-cart template :oops: I wish there was a tutorial on how to do so.
I actually used the mod to show a list of all products in stock, which opens up in a remote control popup window. Just change the db query to Code:
$qry = "SELECT * FROM " . $sql_tbl["products"] . " where forsale='Y' AND avail>0 "; and change the hyperlink to the product |
Nice Mod! This has great potential! :D
|
If you want product thumbs in listing:
skin/SEO_listing.tpl Code:
{* Smarty Template SEO_listing.tpl by Fernando Borcel. MascotasMexico.com 2004/10/31 *} Demo: http://www.7dana.com/shop/all_products.html Also, make your mycatalog.html(all_products.html) a valid HTML, spiders appreciate this. http://validator.w3.org/check?uri=http://www.7dana.com/shop/all_products.html |
Hi there;
I'm in the process to upgrade from 3.2.2 to 4.x.x and one of the reason of my upgrading was the access to "HTML Catalog" feature, which I didn't have on 3.2.2. All my efforts are pointed to Search engines specially Google ( I have very good results on MSN, Yahoo, etc but terrible on Google). Well, my simple question is if this Mod "simulating a static page" is the same thing ( do the same job ) of HTML Catalog; if not which would be better, or maybe I can use both and improve my position on Search Engines, etc. Appreciate any help ! Thanks Aldo |
does this replace the html catalog or ?
Can we use this and the html catalog that is created? I would like to have it for all of my subcategories, did you ever get that finnished?
and when I add or change an item is it automatically updated or what do I have to do to run it if anything? I want to install this soon. Jim |
This mod is great but needs a little work. If you click through a link and go to a product lets say http://www.mysite.com/catalog/big_fat_widget_1.html (using html pages) and then try to add the product to cart you will be redirected to http://www.mysite.com/catalog/big_fat_widget_1cart.php?mode=add is there a workaround for this?
|
Quote:
I think this mod was written more for spider effect than function effect. The way it is laid out, it would so just that successfully. If you just want to list all products add thumbs and use for listing for a single order type sheet, then you are talking about the need for function for the end user? or quick list for admin use? There is another thread right now doing just that for an end user use... |
So Fernando, Gijs Tell me,
Which of the two methods are really the best for spidering. The one fernando came up with first or the one that PhilJ came up with. Reason I ask is Fernandos goes nowhere to link to nothing, just shows products and info. So how effective is this? Second PhilJ's goes to the php files, which HTML is best for spidering. Which of these two methods will really do the best job. Maybe I am issing something here. Do I try to duplicate the files and make them both and watch the logs or what? Anyone have thoughts on this? |
I got it... if you put your full URL in the link full list of stuff
it WORKS!!!! 8O |
What about the way lite commerce handles this
In lite commerce you have a product showcase Organizer - free add on where you can tell what 3 styles to show to the public.
list, table or icon. table - would be the way to go. If you change it to table it gives you the title - price and buy it now. so if you switch to this table and create a catalog with it and then switch back to the icon option you then have static pages which are just words and they can order. How do we get this on x-cart gold? is it possible? http://www.litecommerce.com/addon.html?addon=showcase and what if we gave the customer the option to switch between all 3 choices.. it would make browsing your website a littel more fun, convienent, like they are in control of the shopping experience. |
Nice modification :D
I tweaked it some. Added a different link on the image to help with SEO, along with adding the usual html/body junk. H3 used on product titles, style sheet of xcart used in case someone does click through. I also changed the sql query to return the latest added products to keep events current with search engine findings. I also corrected a bug if a product title had a /w to shorten with, the cart would break. :idea: skin1/SEO_listing.html: Code:
{ config_load file="$skin_config" } customer/listing.php: Code:
<?php .htaccess file: Code:
RewriteEngine on Keep in mind this store was running off the main public_html/ directory, and not a sub directory like xcart/ so my links is example.com/customer/listing.html Kudos! 8) |
You still da' BOSS BOOMER! By the way, hows Baby BOOMER coming along? :D
|
Boomer,
I tried your mod, but it doesn't seem to be working. When I go to www.mysite.com/customer/listing.html, I get the following error: Quote:
Also, the original mod in this thread said to create "SEO_listing.tpl" but your mod says "SEO_listing.html." Was this an oversight/typo on your part, or should it really by .html? Any ideas? Thanks! |
Hi PDI, it's supposed to be .tpl and it goes in skin1/customer/ not in www/customer also, are you on a shared server? Because sometimes with a shared server (and only with certain scripts) you have to set up "full paths" ie. home/yourdomain/www/ . I know, because I've had to do this with some scripts.
|
excellent, thanks!
|
Quote:
Hey Fernando...did you ever post this mod for the sub-categories? If not, it would be great if you could do so... Thanks! |
Hello
Thanks for the above mod, I finally worked out how to do it last night. Once I had it completed I tried the following link as suggested by someone else. http://validator.w3.org/check?uri=http://www.creydall.com/coby/mycatalog.html and recieved 977 errors which means it is not 4.01 compliant. Is this a major problem? and will I still get search engines sniffing around and picking up the page. Is there somewhere that will make it complient like a shareware filter that will adjust the format. Regards Adam |
google, msn and yahoo will all index it.
|
One less thing to worry about
thanks for the reply. Regards Adam |
I forgot to mention... it will take about 6-8 months to see your site anywhere pleasing on google if you are in a highly competitive category. (google sandbox) I built a super seo mod that put me at the top of msn for a ton of gold jewelry and diamond keywords with the highest competition being 126,000,000 but google hasn't picked me up yet. :roll:
|
Static page simulation. Search engine improvements
Hi Ferrando,
I have tried your mod and it works great. However, would you mind to made the listing mod sorted by ascending order? Andy X-cart V. 4.7.0 |
Static page simulation. Search engine improvements
Hi Ferrando,
I have made the change of the mod which can display the listing by ascending order. Andy |
For those asking for the mod to look integrated with x-cart look and feel, and sorted output, you can use the following code:
Replace SEO_listing.php with: Code:
<?php Open skin1/customer/home_main.tpl. Go to the very end and look for: Code:
{else} Before that, add: Code:
{elseif $main eq "SEO_listing"} Lastly, replace skin1/SEO_listing.tpl with: Code:
{* Smarty Template by Fernando Borcel. MascotasMexico.com 2004/10/31 *} .htaccess should include the code: (remember to change /xcarthome with the web directory that your store is at, e.g. /xcart. Options -Indexes Code:
RewriteEngine on To invoke the script, call http://your.store.com/xcarthome/list.html I didn't get around printing the categories too. Maybe I'll hack my own site map mod to handle some mod rewrite in the same manner as this products listing. |
Static page simulation. Search engine improvements
Hi fernando,
I have tried you new mod which works fine and wonderful. Many thank for your effort and share with us. Regards, Andy |
I tried to get this code to working but everytime I tried I got error on this line:
Quote:
The error message is like this: Parse error: parse error, unexpected T_VARIABLE in /Applications/MAMP/htdocs/test_001/xcart_412/customer/listing.php on line 13 I have checked everything, and still get this error, I am testing with 4.012 and also I have tried with 3.7 and other versions and same result. I put files in the same folder that you mentioned here in this page. What do you think would be the cause of this error. Regards, Moza |
Quote:
Check for a missing close bracket } and/or one too many |
Quote:
Hi, I would try and copy the code for listing.php from scratch, it seems that there might be some line(s) missing on the code you copied. |
Thanks for prompt respond,
Quote:
This is the code that I am using: Code:
<?php |
This is my code and it seems to work for me
Code:
<?php Regards Adam |
All times are GMT -8. The time now is 07:02 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.