Nice modification
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.
skin1/SEO_listing.html:
Code:
{ config_load file="$skin_config" }
<html>
<head>
<title>{$lng.txt_site_title} {$lng.txt_subtitle_home}</title>
{ include file="meta.tpl" }
<link rel="stylesheet" href="{$SkinDir}/{#CSSFile#}">
</head>
<body LEFTMARGIN=0 TOPMARGIN=0 RIGHTMARGIN=0 BOTTOMMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
{* Smarty Template SEO_listing.tpl by Fernando Borcel. MascotasMexico.com 2004/10/31 *}
{foreach from=$products item=v key=k}
<h3>
{$products[$k].product}</h3>
{if $products[$k].descr}{$products[$k].descr}{else}{$products[$k].fulldescr}{/if}
[img]{if $full_url}{$http_location}{else}{$xcart_web_dir}{/if}/image.php?productid={$products[$k].productid}[/img]
<hr size=1>
</p>
{/foreach}
</body>
</html>
customer/listing.php:
Code:
<?php
/* Search Engine Enhancement by Fernando Borcel. MascotasMexico.com */
require "./auth.php";
$qry = "SELECT * FROM " . $sql_tbl["products"] . " where forsale='Y' order by add_date DESC";
$result = db_query($qry);
$products = array();
while ($result_row = db_fetch_array($result)) {
$products[] = $result_row;
}
$smarty->assign("products",$products);
$smarty->display("SEO_listing.tpl", $smarty);
?>
.htaccess file:
Code:
RewriteEngine on
Options +FollowSymlinks
RewriteBase /
RewriteRule ^(.*)-pid-([0-9]+)\.html$ /customer/product.php?productid=$2
RewriteRule ^(.*)listing.html$ /customer/listing.php
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!