thanks a lot
i deleted $siteurl/ and now it seems to work fine
it is now in this form :
$link
but in this thread
[url]http://forum.cs-cart.com/showthread.php?t=1179[/url]
I think somebody said google wants that $siteurl/
but for me it causes problems
I think it depends on what version you are running? When using 1.3.4 I think the code was without $siteurl. 1.3.5 requires it to be added.
you are right .I am using 1.3.4.
thanks
[url]http://www.url.co.uk/product-[/url] oduct.html
all my product links are coming up like this?
Is this because my seo is url.co.uk/manufacturer/product.html and not url.co.uk/product.html???
Also as aboive i could only get it to work from hoenys code in the previous thread.
no matter what seo setting i chose i still get [url]MyURL.co.uk - MyURL.co.uk oduct.html - categories seem all ok…
Thanks Alfie
EDIT All ok now!! as per the first post by honey… my bad!!!
EDIT AGAIN, is there any way i can get the CMS pages (under information) to appear in the sitemap??
THANKS!!!
Alfie
I also made this little addition:
In ‘/skins/ADMIN_SKIN/admin/top_quick_links.tpl’
Remove the part in [COLOR=blue]blue[/COLOR] and add the part in [COLOR=red]red[/COLOR]
{$lang.view_storefront} | [COLOR=blue][B] [/B][/COLOR]
[COLOR=red]Google Sitemap | [/COLOR]
[quote name=‘mdekok3000’]I also made this little addition:
In ‘/skins/ADMIN_SKIN/admin/top_quick_links.tpl’
Remove the part in [COLOR=blue]blue[/COLOR] and add the part in [COLOR=red]red[/COLOR] [/QUOTE] Hmm. color was green in my browser
After using the code I get the following error:
XML Parsing Error: no element found
Location: [url]http://london-tech.com/cscart/index.php?target=google_sitemap[/url]
Line Number 11, Column 1:
Advice please?
Excellent sitemap - thank you for the updated code.
Great thread, though I think architeach actually made the file layout a little more complicated than it has to be. I’m not sure why you’d ever need an XML sitemap for the admin section, so I simply did the following:
In the CONFIG.php below this line:
```php
‘logs’ => TARGETS_DIR . ‘logs.php’,
```
add this line:
```php
‘google_sitemap’ => TARGETS_DIR . ‘google_sitemap.php’,
```
then, just add the main sitemap code to targets/google_sitemap.php:
```php
// File: GOOGLE_SITEMAP.PHP
// Description: Google Sitemap Generator.
// Created: 2006-10-12
// Ver: $Id: google_sitemap.php 2 2006-10-12 00:0:00Z lsb $
//
// Copyright 2006 (c) RENS Management, LLC. All rights reserved.
//========================================================================
if ( !defined('IN_CSCART') ) { die('Access denied'); }
$products=$categories=array();
$categories_all=db_get_array("SELECT category_id FROM $db_tables[categories] WHERE membership_id=0 && avail='Y'");
$products_all=db_get_array("SELECT product_id FROM $db_tables[products] WHERE avail='Y'");
while (list(, $cats) = each($categories_all)) $categories[]=$cats['category_id'];
while (list(, $items) = each($products_all)) $products[]=$items['product_id'];
header("Content-Type: text/xml;charset=utf-8");
$lastmod = date("Y-m-d", time());
$siteurl = utf8_encode(htmlentities("$http_location"));
echo <<
$siteurl
$lastmod
daily
1.0
\n
START;
// process categories
foreach ($categories as $category) {
$link = utf8_encode(htmlentities(“$http_location/$index_script?$target_name=categories&category_id=$category”));
fn_convert_php_urls($link);
echo <<
$siteurl/$link
$lastmod
daily
0.5
\n
LINKS;
}
// process products
foreach ($products as $product) {
$link = utf8_encode(htmlentities(“$http_location/$index_script?$target_name=products&product_id=$product”));
fn_convert_php_urls($link);
echo <<
$siteurl/$link
$lastmod
daily
0.5
\n
LINKS;
}
echo <<
END;
exit;
?>
```
I also added the following to my .htaccess file (in the parent level CS-Cart directory) to allow me to use mysite.com/sitemap.xml to link to my sitemap:
RewriteRule ^sitemap.xml$ index.php?target=google_sitemap [L]
Note that that line has to go after RewriteEngineOn, but before the RewriteCond statements.
Actually the way he did it by putting the code into the includes folder is the common method of doing it for CS-Cart. But yes, your method works too.
Also, the way he did it wasn’t creating a sitemap of the admin, it still only created the sitemap for the customer side and just displayed it on both sides.
[quote name=‘jimcontext’]
RewriteRule ^sitemap.xml$ index.php?target=google_sitemap [L]
Note that that line has to go after RewriteEngineOn, but before the RewriteCond statements.[/QUOTE]
and I’ve added this to my index.tpl file…
I tryed everything:
the result is
-----
The following tags were not closed: urlset. Error processing resource 'http://www.agande.net/CS_cart/index.php?target=googl…
----
Can’t find what’s wrong
Why it doesn’t understand the code? and thinks that there is no tag?
My site is russian and my sitemap have mistake
http://s****booking.com.ua/index.php?target=google_sitemap
How it to correct in russian if it nessesary? Whether it will work in the given kind&?
−
http://s****booking.com.ua[COLOR=“Red”]/aeuaiiu-e-caaioiaee/[/COLOR]7-gypsies.html
2008-10-20
daily
0.5
Thanks
Somebody knows how much it is the big problem? In advance thanks
Solved
1.3.5sp4
[quote]XML Parsing Error: no element found
Location: [url]http://www.qent.com.au/index.php?target=google_sitemap[/url]
Line Number 9, Column 1:
[/quote]
Help?
I’m getting the same thing. I’ve followed several different posts, but none of them work. I either get a blank page or…
XML Parsing Error: no element found
Location: [url]http://www.qref.com/index.php?target=google_sitemap[/url]
Line Number 9, Column 1:
^
Running 1.3.5 SP3, SEO ON. Help!!
thnx works great!
out of curiosity, what if i’d like to add the product name to the sitemap? How could i save that extra information in the array?
like a goofball i didn’t backup first, installed this mod, it completely roached my cart from the inside out, steer clear of this mod, it does not work…
XML Parsing Error: not well-formed
Location: [url]http://www.eniyial.com/index.php?target=google_sitemap[/url]
Line Number 90442, Column 77:
----------------------------------------------------------------------------^
Sno,
What’s the XML output you’ve got there, didn’t you notice the 3rd party link?