Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Free Sitemap addon, works with XC SEO

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 11-12-2007, 04:59 PM
 
intel352 intel352 is offline
 

X-Wizard
  
Join Date: Dec 2005
Posts: 1,071
 

Talking Free Sitemap addon, works with XC SEO

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.
Attached Files
File Type: zip phpsitesolutions_xcart_sitemap.zip (5.5 KB, 412 views)
__________________
-Jon Langevin
WARNING: Unethical developer - NOT RECOMMENDED
See details here
Reply With Quote
  #2  
Old 11-13-2007, 02:10 AM
  Zaja's Avatar 
Zaja Zaja is offline
 

X-Adept
  
Join Date: Mar 2004
Location: The Universe is my home
Posts: 420
 

Default Re: Free Sitemap addon, works with XC SEO

Wow .... thank you Jon.
__________________
_/ _/ _/ _/ _/ _/ _/ _/ _/

7dana.com
Reply With Quote
  #3  
Old 11-13-2007, 04:24 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default 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"])){
foreach(
$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(
$active_modules["XC_SEO"])){
foreach(
$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.
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #4  
Old 11-13-2007, 05:04 AM
 
intel352 intel352 is offline
 

X-Wizard
  
Join Date: Dec 2005
Posts: 1,071
 

Default 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

UPDATE:
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
__________________
-Jon Langevin
WARNING: Unethical developer - NOT RECOMMENDED
See details here
Reply With Quote
  #5  
Old 11-13-2007, 07:34 AM
 
POSDepot POSDepot is offline
 

Advanced Member
  
Join Date: Sep 2002
Posts: 52
 

Default 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

Thanks
__________________
X-Cart Gold
4.1.9
Reply With Quote
  #6  
Old 11-13-2007, 07:46 AM
 
intel352 intel352 is offline
 

X-Wizard
  
Join Date: Dec 2005
Posts: 1,071
 

Default 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:

Find:
Code:
{else} {include file="common_templates.tpl"} {/if}

Add before:
Code:
{elseif $main eq "sitemap"} {include file="sitemap.tpl"}
__________________
-Jon Langevin
WARNING: Unethical developer - NOT RECOMMENDED
See details here
Reply With Quote
  #7  
Old 11-13-2007, 07:48 AM
 
POSDepot POSDepot is offline
 

Advanced Member
  
Join Date: Sep 2002
Posts: 52
 

Default Re: Free Sitemap addon, works with XC SEO

Perfect now .... thanks so much!!
__________________
X-Cart Gold
4.1.9
Reply With Quote
  #8  
Old 11-13-2007, 07:54 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default 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
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #9  
Old 11-13-2007, 08:32 AM
  Dongan's Avatar 
Dongan Dongan is offline
 

X-Wizard
  
Join Date: Jul 2005
Location: www.mercuryminds.com
Posts: 1,531
 

Default Re: Free Sitemap addon, works with XC SEO

Nice mod.
Reply With Quote
  #10  
Old 11-13-2007, 08:40 AM
 
Acquamarina Acquamarina is offline
 

X-Adept
  
Join Date: Aug 2006
Location: USA
Posts: 811
 

Default Re: Free Sitemap addon, works with XC SEO

Hi,
Does it work with DSEFU from SafetyNetWeb?

Thanks!
__________________
Vera B
4.4.5
CFLSystems.com mods, Kosmos eBay Integration, Feed Manager Pro, custom mods, BCSEngineering Mods, CDSEO PRO
Hosting by EWDHosting - The best home for your x-cart.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:13 AM.

   

 
X-Cart forums © 2001-2020