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)

Jerrad 05-26-2006 11:12 PM

Quote:

Originally Posted by patrick24601
I am having a problem with this mod.

When I installed it I had several top level categories with subcats and only one of the subcats had products. And then it worked great.

I just updated one of my other subcategories to now have products and I cannot get those to show up in the sitemap. It almost looks like the data is cached someplace and needs a refresh.

To see this go to www.patrickallmond.com

If you click on 'MP3' on the left hand side you will see that I have several subcategories.

But you click on sitemap you will see those don't show up in the site map.

Any help would be appreciated.


I'm having exactly the same problem as Patrick.
New and/or changed categories show up fine, but new added subcategories won't show.
But when a subcategory is renamed, it will be updated correctly in the sitemap...

Anybody had the same problem and found a way to fix this?

Thanks in advance!

weckie 05-28-2006 07:34 AM

Re: sitemap mod not working with 4.1.0
 
Quote:

Originally Posted by Hyperdelicious
I had this sitemap working with 4.0.13 and since updating cart to 4.1.0 the sitemap mad isn't working any more ... page only shows bullets nothing more ... any ideas?

I'd also like the sitemap to list all products ... any one accomplish this or have ideas?


I have installed in on to 4.1.1 but it shows only three cats, i am having more than that. Anyone?
see it at: http://www.weckonline.nl/weckonline/shop/sitemap.php

v2 06-18-2006 11:55 PM

is it possible to make an xml file of this sitemap? So you can post it on Google?

nfc5382 07-23-2006 10:56 AM

works perfect, thanks!

3DLover 07-24-2006 12:19 AM

$allcategories broken in 4.1.2 ???? - Possible BUG?
 
I've been working with X-Cart for only one week now so I may be off base here, but I think I know why this mod is not working on the current version of X-Cart.

I've been hacking at the code a bit, and it appears that the $allcategories variable is not returning _ALL_ of the categories, just the root categories. I've also found that when you have cat=X as part of the URL (HTTP Get variable) and you replace X with a known category number, the $allcategories contains the root categories plus any subcategories of X. Now, I have never used any versions other than 4.1.2, but this does not seem to be the behavior that is to be expected. In the code that Fernando posted, it clearly appears that he is truly expecting a full dump of every category in the $allcategories variable. This is a bit of code I wrote to dump out all of the information in the $allcategories variable:

Code:

{foreach from=$allcategories item=mycat key=catid}
  {$catid} -

  {foreach from=$mycat item=x key=y}
    ({$x} - {$y})

  {/foreach}
 

{/foreach}


On a slightly different topic, I noticed several ppl mention that this mod was resource hungry when used on sites with large numbers of categories. The reason for this is easy to understand by looking at Fernando's code... he is continually looping through the $allcategories var each time he sees a category with sub categories. In trying to figure out the above bug, and also improve the speed of this mod, I discovered the $subcategories variable. It's interesting because it only contains the categories of a specific parent category. If I change the URL to include the cat=X GET var, it gives me the sub cats in a nice short array. I figured I'd be clever and change $cat like so: {assign var="cat" value=X} (making X a valid category number) Unfortunately, this makes no difference. It appears that $subcategories is assigned only once, and can only be controlled when $cat is assigned in a HTTP GET. Does anyone know how to make a function that would return an array of subcategories for a specific parent category?

hansmoen 07-25-2006 05:23 AM

Page Title
 
Quote:

Originally Posted by moneysaver67
all,

I personally added

Code:

$smarty->assign("title", "Sitemap Title");

to my sitemap.php to include a page title...


Using the Flexi Rectangle skin I had to use:

Code:

$location[] = array("Sitemap Title", "/sitemap.php");
$smarty->assign("location", $location);


in sitemap.php



HK

X-Cart 4.0.18 Gold - Flexi Rectangle

leorulz 08-22-2006 12:56 PM

Re: Site map page
 
i have installed Fernando's module for my x-cart 4.1.2, but somehow i am getting gibberish:[*][*][*][*][*]Diamond Watches
[/list][*][*][*][*][/list].
You can look here at http://www.dreamindiamonds.com/store/sitemap.php.

Can anybody help me out?
Thanks.

jayzee 08-23-2006 07:47 AM

Re: Site map page
 
has anyone worked outhow to get this working on 4.1.2?

seems that $allcategories now only holds top level categories in it and not subcategories which is why it doesn't work.

Now if I remeber right fancy categories should get all the info needed, will have a look now and see if i can find the answer.

J

candleshopcreations 09-17-2006 03:12 PM

Re: Site map page
 
Quote:

Originally Posted by PremiumPonyParts
Make sure that when you link to it in your files, your pointing it to the root, not just calling it by sitemap.php so do xcartdir/sitemap.php

otherwise, when the catalog calls it, its gonna do xcartdir/catalog/sitemap.php

Also, your sitemap won't link to the HTML pages you've made. But the Advanced Site Map that you can buy does, and works great.


ok, i tried to make this change but then the file is not there. this is what is in my categories.tpl:

<FONT class="CategoriesList"><A href="/store/sitemap.php" class=VertMenuItems>{$lng.lbl_sitemap}</A></FONT>

i'm guessing i called something wrong? b/c here's what i get

Site map[*]Decorative[*]Floating Candles[*]Floating Candles - 5 packs[*]Foating Candle Guest Favors[/list][*]Gifts for Baby[*]Guest Favors for Baby Showers[*]Just for baby[/list][*]Guest Favors[*]Handcrafted cards[*]New Products![*]Pillar Candles[*]Tealights and Votives[*]Tealights and Votives - 5 packs[*]Tealights and Votives - Guest Favors[/list][*]Weddings[*]Wedding Decorations[*]Wedding Guest Favors[/list][/list]
thanks,

candleshopcreations 09-17-2006 06:37 PM

Re: Site map page
 
Just wanted to say thank you to John at Safety Web Net for fixing my sitemap. This simply stellar customer service and it wasn't even his product! Highly recommend Safety Web Net!


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

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