Contributions
New Google Sitemap Generator
Not sure if these are allowed on here (Chemo made them!) but attached are two php files that generate xml files on the fly. Create a Google Sitemaps account and Google will crawl the page regularly without the need for Cron jobs or any file tweaks. This also works with Chemo's SEO contribution.
No work at all done by myself; all credit to Chemo.
Support thread: http://forums.oscommerce.com/index.php?showtopic=282968
Again all thanks to Chemo.
Expand All / Collapse All
added one for reviews.
not the best coder though
basically added a new query and edit the loop
$sql2 = "SELECT products_id as pID,
products_id as products_id
FROM " . TABLE_REVIEWS . "";
/*
* Execute the query
*/
$query = tep_db_query($sql);
$query2 = tep_db_query($sql2);
/*
* If there are returned rows...
* Basic sanity check
*/
if ( tep_db_num_rows($query) > 0 ){
/*
* Initialize the variable containers
*/
$container = array();
$number = 0;
$top = 0;
/*
* Loop the query result set
*/
while( $result = tep_db_fetch_array($query)){
$pID = tep_db_fetch_array($query2);
$top = max($top, $pID['products_id'], $result['date_added']);
$location = tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $pID['pID'] . '&'. 'reviews_id=' . $result['rID'], 'NONSSL', false);
if ( tep_not_null($result['last_mod']) ){
$lastmod = $result['last_mod'];
} else {
$lastmod = $result['date_added'];
}
$changefreq = 'weekly';
$ratio = ($top > 0) ? ($result['date_added']/$top) : 0;
$priority = $ratio < .1 ? .1 : number_format($ratio, 1, '.', '');
/*
* Initialize the content container array
*/
$container = array('loc' => htmlspecialchars(utf8_encode($location)),
'lastmod' => date ("Y-m-d", strtotime($lastmod)),
'changefreq' => $changefreq,
'priority' => $priority
);
THANKS to who created this and the others!
I downloaded NGS1.2 version, but it did not work on my 2.2 version.
I added following lines instead of application_top/bottom.php
define('SEARCH_ENGINE_FRIENDLY_URLS', 'false');
require('includes/configure.php');
require(DIR_WS_INCLUDES . 'filenames.php');
require(DIR_WS_INCLUDES . 'database_tables.php');
require(DIR_WS_FUNCTIONS . 'database.php');
tep_db_connect() or die('Unable to connect to database server!');
require(DIR_WS_FUNCTIONS . 'general.php');
require(DIR_WS_FUNCTIONS . 'html_output.php');
esta es una version de la1.1 sin manufacturers, pero con los parents de las categorias, aunque estas no tengan productos
I've added the manufacturers XML sitemap, you need to insert the new general website map into google webmasters.
Thanks :D
FULL package!
Little change in the header of each file... to prevent the error of Bad Sitemap structure.
Not sure if these are allowed on here (Chemo made them!) but attached are two php files that generate xml files on the fly. Create a Google Sitemaps account and Google will crawl the page regularly without the need for Cron jobs or any file tweaks. This also works with Chemo's SEO contribution.
No work at all done by myself; all credit to Chemo.
Support thread: http://forums.oscommerce.com/index.php?showtopic=282968
Again all thanks to Chemo.
Note: Contributions are used at own risk.