X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Third Party Add-Ons for X-Cart 4 (https://forum.x-cart.com/forumdisplay.php?f=45)
-   -   free google sitemap (https://forum.x-cart.com/showthread.php?t=51775)

lewaff 09-05-2010 10:48 PM

Re: free google sitemap
 
Thanks
Great that works fine
Now is there anyway of stopping it putting these and any un needed lines
Quote:

- <url>
<loc>http://www.qualitechnic.co.uk/help.php?section=business</loc>

<lastmod>2010-09-06</lastmod>

<changefreq>monthly</changefreq>

<priority>0.6</priority>

</url>


- <url>
<loc>http://www.qualitechnic.co.uk/help.php?section=conditions</loc>

<lastmod>2010-09-06</lastmod>

<changefreq>monthly</changefreq>

<priority>0.6</priority>

</url>


- <url>
<loc>http://www.qualitechnic.co.uk/register.php</loc>

<lastmod>2010-09-06</lastmod>

<changefreq>monthly</changefreq>

<priority>0.6</priority>

</url>


- <url>
<loc>http://www.qualitechnic.co.uk/help.php?section=Password_Recovery</loc>

<lastmod>2010-09-06</lastmod>

<changefreq>monthly</changefreq>

<priority>0.6</priority>

</url>



thanks Lewis

Quote:

Originally Posted by cflsystems
Actually the code I posted fixes the code you are reffering to. But you can still use the code you have just replace
Code:

if (is_array($cats[0]))
foreach($cats as $ca) {
if ($ca["clean_url"] == "")
$url = $http_location.'/home.php?cat='.$ca["categoryid"];
else
$url = $http_location.'/'.$ca["clean_url"];
 
$xml .= '<url>
<loc>'.$url.'</loc>
<lastmod>'.$today.'</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>';
}
if (is_array($mans[0]))
foreach($mans as $ma) {
if ($ca["clean_url"] == "")
$url = $http_location.'/manufacturers.php?manufacturerid='.$ma["manufacturerid"];
else
$url = $http_location.'/'.$ma["clean_url"];
 
$xml .= '<url>
<loc>'.$url.'</loc>
<lastmod>'.$today.'</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>';
}
if (is_array($prods[0]))
foreach($prods as $pr) {
if ($pr["clean_url"] == "")
$url = $http_location.'/product.php?productid='.$pr["productid"];
else
$url = $http_location.'/'.$pr["clean_url"];
 
$xml .= '<url>
<loc>'.$url.'</loc>
<lastmod>'.$today.'</lastmod>
<changefreq>monthly</changefreq>
<priority>0.6</priority>
</url>';
}
if (is_array($pages[0]))
foreach($pages as $pa) {
if ($pa["clean_url"] == "")
$url = $http_location.'/pages.php?pageid='.$pa["pageid"];
else
$url = $http_location.'/'.$pa["clean_url"];
 
$xml .= '<url>
<loc>'.$url.'</loc>
<lastmod>'.$today.'</lastmod>
<changefreq>monthly</changefreq>
<priority>0.6</priority>
</url>';
}

with this
Code:

if (is_array($cats[0]))
 foreach($cats as $ca) {
  if ($ca["clean_url"] == "")
  $url = $http_location.'/home.php?cat='.$ca["categoryid"];
  else
  $url = $http_location.'/'.$ca["clean_url"].$config['SEO']['clean_urls_ext_c'];
 
  $xml .= '<url><loc>'.$url.'</loc><lastmod>'.$today.'</lastmod><changefreq>weekly</changefreq><priority>0.5</priority></url>
';
 }
if (is_array($mans[0]))
 foreach($mans as $ma) {
  if ($ca["clean_url"] == "")
  $url = $http_location.'/manufacturers.php?manufacturerid='.$ma["manufacturerid"];
  else
  $url = $http_location.'/'.$ma["clean_url"].$config['SEO']['clean_urls_ext_m'];

  $xml .= '<url><loc>'.$url.'</loc><lastmod>'.$today.'</lastmod><changefreq>weekly</changefreq><priority>0.5</priority></url>
';
 }
if (is_array($prods[0]))
 foreach($prods as $pr) {
  if ($pr["clean_url"] == "")
  $url = $http_location.'/product.php?productid='.$pr["productid"];
  else
  $url = $http_location.'/'.$pr["clean_url"].$config['SEO']['clean_urls_ext_p'];
 
  $xml .= '<url><loc>'.$url.'</loc><lastmod>'.$today.'</lastmod><changefreq>weekly</changefreq><priority>0.5</priority></url>
';
 }
if (is_array($pages[0]))
 foreach($pages as $pa) {
  if ($pa["clean_url"] == "")
  $url = $http_location.'/pages.php?pageid='.$pa["pageid"];
  else
  $url = $http_location.'/'.$pa["clean_url"].$config['SEO']['clean_urls_ext_s'];
 
  $xml .= '<url><loc>'.$url.'</loc><lastmod>'.$today.'</lastmod><changefreq>weekly</changefreq><priority>0.5</priority></url>
';
 }



jones 09-05-2010 11:23 PM

Re: free google sitemap
 
1 Attachment(s)
Thank you Steve,

I have added changes to module :)


Quote:

Originally Posted by lewaff
Thanks
Great that works fine
Now is there anyway of stopping it putting these and any un needed lines

thanks Lewis


You can remove/change these URLs from admin area on Genaral Settings/Google SiteMap options -> "Additional URLs." field.

Alex

UPDATED: forgot file with new version.

jones 09-05-2010 11:26 PM

Re: free google sitemap
 
Lewis,

Can you confirm that you see text "Google SiteMap options" in admin area on General Settings page under "General options" link ?

Thank you,
Alex

lewaff 09-05-2010 11:43 PM

Re: free google sitemap
 
OOOPS
Silly Me
I seen that earlier
thanks again
lewis
Quote:

Originally Posted by jones
Lewis,

Can you confirm that you see text "Google SiteMap options" in admin area on General Settings page under "General options" link ?

Thank you,
Alex


sdfjlsdfsdf 09-07-2010 01:04 AM

Re: free google sitemap
 
Just like to thank-you for all the hard work you guys put into this, was extremely useful. Your a credit to the community :)

DisCost 10-18-2010 05:36 PM

Re: free google sitemap
 
I am having the empty sitemap.xml problem, and when I comment out the "if ($xm_today..." browsing to /admin just gives me an empty page.

fou 10-19-2010 04:33 AM

Re: free google sitemap
 
Do you have last verion of module?

Quote:

Originally Posted by DisCost
I am having the empty sitemap.xml problem, and when I comment out the "if ($xm_today..." browsing to /admin just gives me an empty page.


betty4 10-19-2010 12:37 PM

Re: free google sitemap
 
Will this work on 4.0.x?

fou 10-19-2010 01:35 PM

Re: free google sitemap
 
Quote:

Originally Posted by betty4
Will this work on 4.0.x?


Yes, it should work with 4.0.x

Alex

DisCost 10-19-2010 06:08 PM

Re: free google sitemap
 
I'm using the file from post#32, it could be that the file is timing out because I have ~5k products


All times are GMT -8. The time now is 03:21 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.