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)
-   -   Site map page (https://forum.x-cart.com/showthread.php?t=12393)

jayzee 09-18-2006 12:51 AM

Re: Site map page
 
could you post your sitemap files so we can see how they got round you problem.
thanks

J

Impact_1 01-11-2007 02:23 PM

Re: Site map page
 
Any new code for this? 4.1.3 or above?

PhilJ 01-11-2007 02:32 PM

Re: Site map page
 
Here's a basic sitemap, though it doesn't show categories.
http://www.xcartmods.co.uk/click.php?id=10

medici 04-03-2007 12:26 PM

Re: Site map page - Links
 
I can't figure out how to link the site map's text to the appropriate category/subcategory page. Any help would be appreciated.

HTML Code:

{* $Id: sitemap.tpl,v 1.00 2005/02/24 09:53:29 max Exp $ *}
{include file="dialog.tpl" title="Site Map" content=$smarty.capture.sitemap extra="width=100%"}
{capture name=sitemap}
<ul type="square">
{*** start unordered list***}
{section name=l1_cat_num loop=$allcategories}
{*** loop ALL categories ***}
{if $allcategories[l1_cat_num].parentid eq 0}
{*** loop root categories/parentid 0 - level 1***}
<li>
{$allcategories[l1_cat_num].category}
 
{if $allcategories[l1_cat_num].subcategory_count gt 0}
{*** check if root cat has child cats ***}
 
<ul type="square">
{section name=l2_cat_num loop=$allcategories}
{*** loop through sub cats with matching parent id ***}
 
{if $allcategories[l2_cat_num].parentid eq $allcategories[l1_cat_num].categoryid}
<li>
{$allcategories[l2_cat_num].category}
{if $allcategories[l2_cat_num].subcategory_count gt 0}
{*** check if parent has child cats***}
 
<ul type="square">
 
{section name=l3_cat_num loop=$allcategories}
 
{if $allcategories[l3_cat_num].parentid eq $allcategories[l2_cat_num].categoryid}
<li>
{$allcategories[l3_cat_num].category}
 
{if $allcategories[l3_cat_num].subcategory_count gt 0}
{*** check if parent has child cats***}
 
<ul>
 
{section name=l4_cat_num loop=$allcategories}
 
{if $allcategories[l4_cat_num].parentid eq $allcategories[l3_cat_num].categoryid}
<li>
{$allcategories[l4_cat_num].category}
{/if}{/section}</ul>
{/if}{/if}{/section}</ul>
{/if}{/if}{/section}</ul>
{/if}{/if}{/section}</ul>
{/capture}


groovedis 04-25-2007 09:58 AM

Re: Site map page
 
Not working for me either. All I get is our categories and subcategories listed like this...

[*]New releases[*]Albums[*]Breaks[*]DJ Tools[*]Downtempo, Leftfield[*]Drum & Bass[*]Electro[*]Grime[*]Hip Hop[*]House[*]Indie[*]Mash-Ups[*]Nu Jazz, Broken Beat[*]Reggae, Dub[*]Reissue, Jazz, Funk[*]Soul[*]Techno[*]World[/list][*]Singles[*]Breaks[*]Downtempo, Leftfield[*]Drum & Bass[*]Electro[*]Grime[*]Hip Hop[*]House[*]Indie[*]Mash-Ups[*]Nu Jazz, Broken Beat[*]Reedit[*]Reggae, Dub[*]Reissue, Jazz, Funk[*]Soul[*]Techno[*]World[/list][/list][*]Restocks

etc.

Any help?

JWait 05-02-2007 07:40 AM

Re: Site map page
 
Here is what I am using....

Code:

{* $Id: sitemap.tpl,v 1.00 2005/02/24 09:53:29 max Exp $ *}
{capture name=sitemap}
<ul> {*** start unordered list***}
{section name=l1_cat_num loop=$allcategories} {*** loop ALL categories ***}
  {if $allcategories[l1_cat_num].parentid eq 0} {*** loop root categories/parentid 0 - level 1***}
      <li><a href="home.php?cat={$allcategories[l1_cat_num].categoryid}">{$allcategories[l1_cat_num].category}</a></li>

      {if $allcategories[l1_cat_num].subcategory_count gt 0} {*** check if root cat has child cats ***}
        <ul>
            {section name=l2_cat_num loop=$allcategories} {*** loop through sub cats with matching parent id ***}
              {if $allcategories[l2_cat_num].parentid eq $allcategories[l1_cat_num].categoryid}
                  <li><a href="home.php?cat={$allcategories[l2_cat_num].categoryid}">{$allcategories[l2_cat_num].category}</a></li>

              {if $allcategories[l2_cat_num].subcategory_count gt 0} {*** check if parent has child cats***}
                  <ul>
                    {section name=l3_cat_num loop=$allcategories}
                        {if $allcategories[l3_cat_num].parentid eq $allcategories[l2_cat_num].categoryid}
                          <li><a href="home.php?cat={$allcategories[l3_cat_num].categoryid}">{$allcategories[l3_cat_num].category}</a></li>

                        {if $allcategories[l3_cat_num].subcategory_count gt 0} {*** check if parent has child cats***}
                          <ul>
                              {section name=l4_cat_num loop=$allcategories}
                                {if $allcategories[l4_cat_num].parentid eq $allcategories[l3_cat_num].categoryid}
                                    <li><a href="home.php?cat={$allcategories[l4_cat_num].categoryid}">{$allcategories[l4_cat_num].category}</a></li>

                        {/if}{/section}</ul>

            {/if}{/if}{/section}</ul>

      {/if}{/if}{/section}</ul>

  {/if}{/if}{/section}
</ul>
{/capture}

{include file="dialog.tpl" title="Site map" content=$smarty.capture.sitemap extra="width=100%"}


medici 05-02-2007 11:19 AM

Re: Site map page
 
Nice work JWait. It works great.

groovedis 05-02-2007 11:44 AM

Re: Site map page
 
Yeah this works perfectly. Thanks JWait!

sbstart 05-30-2007 09:26 AM

Re: Site map page
 
when I pull up my sitemap my categories and products look like this:

[*] [*] [*] [*] [*] [/list]http://www.sbstartupco.com/store/sitemap.php

any help would be greatly appreciated

version 4.1

JWait 06-01-2007 09:58 AM

Re: Site map page
 
The code I posted is for version 4.0.19. Version 4.1.x is totally different and as far as I know there is not a working sitemap for those versions.


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

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