X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Free Sitemap addon, works with XC SEO (https://forum.x-cart.com/showthread.php?t=35373)

intel352 11-12-2007 04:59 PM

Free Sitemap addon, works with XC SEO
1 Attachment(s)
I've created a Sitemap addon that is free to use. This is not for generating XML sitemaps, just a visual sitemap for visitors (and search engines might find it useful, but no guarantee).

If you'd like to see the addon in use, you can view it in action here:

http://www.capefearstyles.com/sitemap.php << Sitemap using XC SEO

http://www.papertrails.com/store/sitemap.php << Modified version of sitemap using DSEFU (note: large number of categories/products, normally loads fine, but with DSEFU enabled loads noticeably slower, which is why DSEFU is not supported in the public release)

For SEO:
This sitemap is great for site users, but for SEO purposes, it's recommended to only have 100 links per page or less, as Google recommends: http://www.google.com/support/webmasters/bin/answer.py?answer=35769

Currently the sitemap doesn't provide settings for picking & choosing what you want to display, but it's simple enough to edit the php or template code to reduce what is displayed.

Zip is attached below :-)

Just a note, this has been tested on 4.1, will likely work on 4.0, no clue about 3.x

!!! UPDATE !!! Jan 17, 2007

I have renamed the variables in use by the mod, so that there are no longer any conflicts with normal category variables (meaning, your categories no longer reorder randomly).
Other minor changes.
Version incremented to v1.3

94 downloads prior to updating the archive.

New zip file is attached.

Zaja 11-13-2007 02:10 AM

Re: Free Sitemap addon, works with XC SEO
Wow :D .... thank you Jon.

cflsystems 11-13-2007 04:24 AM

Re: Free Sitemap addon, works with XC SEO
Joh nice mod. Looks good too. By the way for some reason (maybe something I've changed before in other files) I had to put the 2 tpl files in skin1/customer and change the path in them to point to skin1/customer. Also when I first tried it I got a php error - "Invalid argument supplied for foreach()" for $pages. I do not have static pages defined on my site and the query for $pages returns empty string. This is a bug in php - look here http://pear.php.net/bugs/bug.php?id=1983 and here http://pear.php.net/bugs/bug.php?id=5216. I guess I'm missing some bug fixes but what I did to go around it is I changed the following code in sitemap.php and works fine.

this code
PHP Code:

if (!empty($active_modules["XC_SEO"])){
$pages AS $k=>$page) {
$pages[$k]['seo_url'] = $seo->_pages_callback(array("pages.php?pageid=".$page['pageid'],false,'','pageid='.$page['pageid'],'',''), true$page['title']);

with this code
PHP Code:

if (!empty($pages)){
if (!empty(
$pages AS $k=>$page) {
$pages[$k]['seo_url'] = $seo->_pages_callback(array("pages.php?pageid=".$page['pageid'],false,'','pageid='.$page['pageid'],'',''), true$page['title']);

Just thought maybe someone else had the same as me and this might help them. Thanks Jon.

intel352 11-13-2007 05:04 AM

Re: Free Sitemap addon, works with XC SEO
That's quite interesting you had to put the files in the skin1/customer folder, I've not seen that issue yet ;-)

Thanks for the catch on the empty pages var, I just added the XC SEO bit last night, I'll make that correction. Cheers :-)

I updated the zip with changes that should correct similar errors for others, it's been updated in the first post
This isn't a major or required update, so the 8 people that downloaded this already, you'll likely be fine :-)

POSDepot 11-13-2007 07:34 AM

Re: Free Sitemap addon, works with XC SEO
Very interested in this but I am getting an error.

Page shows up with title and surrounding template but with this text in it:

"Page not found!
The requested page does not exist or you are not allowed to access it!"

I followed the directions but maybe I am missing something.

Using EWDhosting


intel352 11-13-2007 07:46 AM

Re: Free Sitemap addon, works with XC SEO
I apologize everyone, I missed an edit required in skin1/customer/home_main.tpl (this is a mod that has evolved over a few weeks, so I forgot about an initial edit)

Open skin1/customer/home_main.tpl:


{include file="common_templates.tpl"}

Add before:

{elseif $main eq "sitemap"}
{include file="sitemap.tpl"}

POSDepot 11-13-2007 07:48 AM

Re: Free Sitemap addon, works with XC SEO
Perfect now .... thanks so much!!

cflsystems 11-13-2007 07:54 AM

Re: Free Sitemap addon, works with XC SEO
Now it makes sense why it didn't work for me when I put the files in root :-) I missed that one too. Thanks Jon great job

Dongan 11-13-2007 08:32 AM

Re: Free Sitemap addon, works with XC SEO
Nice mod.

Acquamarina 11-13-2007 08:40 AM

Re: Free Sitemap addon, works with XC SEO
Does it work with DSEFU from SafetyNetWeb?


All times are GMT -8. The time now is 03:08 AM.

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