Dynamic SiteMap
#361
Posted 12 October 2006, 17:47
#362
Posted 16 October 2006, 23:41
Fatal error: Class 'osC_CategoryTree' not found in \home\mysite\dynamic_sitemap.php on line 58
anyone know the fix for this?
i assume this mod is compatible with HTC and SEO Urls using the cname cpath method on a windows server ?
#363
Posted 17 October 2006, 03:29
Jack
Most Important: Header Tags SEO - Ultimate SEO V 2.2d
All SEO Addons: Recommended SEO Addons
Support Links:
Finding relevant link exchanges - Headers Already Sent - What does it cost? -What's my version? - How to change titles? - Preventing HotLinking
#364
Posted 17 October 2006, 09:45
Jack_mcs, on Oct 17 2006, 04:29 AM, said:
Jack
Hi jack
I've triple checked all the install files and everything is fine. The file "category_tree.php" is in the correct location. ie home/mysite/includes/classes/category_tree.php
I've had this mod working fine on another sever (linux). I'm trying to set up Osc on a new windows server.
The very first MODS i've installed are HTC and SEO URL's , followed by Dynamic site map.
Before this fresh install i ported over my existing shop which is modified and has a working dynamic site map and HTC, as soon as i added SEO URL's (Chemo) , it would no longer function and gave the error as above. Thats why i decided to try a clean install. I used the SEO URL contrib for a windows server (V1.4) using the cname-cpath method of changing the URL.
any ideas where i'm going wrong?
#365
Posted 17 October 2006, 10:03
?
#366
Posted 17 October 2006, 10:08
'.TEXT_EXCLUDE_FOR_UNREG.tep_draw_radio_field('ex_type','unreg');?>
'.TEXT_EXCLUDE_FOR_UNREG.tep_draw_radio_field('ex_type','unreg');?>
'.$exclude['exclude_file'].' ('.( $exclude['exclude_type'] == 1 ? TEXT_ALL : TEXT_UNREG ).') '.TEXT_INCLUDE.'
'; } ?>
'.$exclude['exclude_file'].' ('.( $exclude['exclude_type'] == 1 ? TEXT_ALL : TEXT_UNREG ).') '.TEXT_INCLUDE.'
'; } ?>
#367
Posted 17 October 2006, 10:56
Jack
Most Important: Header Tags SEO - Ultimate SEO V 2.2d
All SEO Addons: Recommended SEO Addons
Support Links:
Finding relevant link exchanges - Headers Already Sent - What does it cost? -What's my version? - How to change titles? - Preventing HotLinking
#368
Posted 17 October 2006, 15:23
Jack_mcs, on Oct 17 2006, 11:56 AM, said:
Jack
Ok , just did a fresh install of Osc for windows server , installed this contrib to the letter added SQL , no other mods added and still the same result in admin/tools/sitemap -
'.TEXT_EXCLUDE_FOR_UNREG.tep_draw_radio_field('ex_type','unreg');?>
'.TEXT_EXCLUDE_FOR_UNREG.tep_draw_radio_field('ex_type','unreg');?>
'.$exclude['exclude_file'].' ('.( $exclude['exclude_type'] == 1 ? TEXT_ALL : TEXT_UNREG ).') '.TEXT_INCLUDE.'
'; } ?>
'.$exclude['exclude_file'].' ('.( $exclude['exclude_type'] == 1 ? TEXT_ALL : TEXT_UNREG ).') '.TEXT_INCLUDE.'
'; } ?>
And on the catalog page -
# ', $parent_group_end_string = ' ', $child_start_string = '', $child_end_string = '
', $spacer_string = '', $spacer_multiplier = 1; function osC_CategoryTree($load_from_database = true) { global $languages_id; $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by c.parent_id, c.sort_order, cd.categories_name"); $this->data = array(); while ($categories = tep_db_fetch_array($categories_query)) { $this->data[$categories['parent_id']][$categories['categories_id']] = array('name' => $categories['categories_name'], 'count' => 0);} } //end class osC_CategoryTree function buildBranch($parent_id, $level = 0) { $result = $this->parent_group_start_string; //starts the
* tag if (isset($this->data[$parent_id])) { foreach ($this->data[$parent_id] as $category_id => $category) { $category_link = $category_id; $result .= $this->child_start_string; // prints if (isset($this->data[$category_id])) {$result .= $this->parent_start_string;} //prints nothing if ($level == 0) {$result .= $this->root_start_string;} //prints nothing $result .= str_repeat($this->spacer_string, $this->spacer_multiplier * $level) . ''; $result .= $category['name']; $result .= ''; if ($level == 0) {$result .= $this->root_end_string;} //prints nothing if (isset($this->data[$category_id])) {$result .= $this->parent_end_string;} //prints
if (isset($this->data[$category_id]) && (($this->max_level == '0') || ($this->max_level > $level+1))) { $result .= $this->buildBranch($category_id, $level+1);} $result .= $this->child_end_string; //prints }// end foreach } // end if (isset $result .= $this->parent_group_end_string; // return $result; } //end function function buildTree() { return $this->buildBranch($this->root_category_id);}} ?>
Fatal error: Class 'osC_CategoryTree' not found in D:\home\mysite\dynamic_sitemap.php on line 58
Cant work out where it's getting "D:\home\mysite\dynamic_sitemap.php" from ? not seen D:\ before ??
?
#369
Posted 17 October 2006, 15:41
Jack
Most Important: Header Tags SEO - Ultimate SEO V 2.2d
All SEO Addons: Recommended SEO Addons
Support Links:
Finding relevant link exchanges - Headers Already Sent - What does it cost? -What's my version? - How to change titles? - Preventing HotLinking
#370
Posted 17 October 2006, 16:02
Jack_mcs, on Oct 17 2006, 04:41 PM, said:
Jack
ah-ha ! I'm using v2.0 7 Jul 2006 .... i thought this was a full package
#371
Posted 18 October 2006, 22:37
fungicide98, on Aug 21 2006, 03:48 PM, said:
Don't know if this got fixed, but I was having the same problem as someone earlier with the sitemap coming up blank with installed on a site using STS. I've managed to work around the problem, but I don't know why what I did works.
What I did was take the shipping.php file and modify it to include the code to display the site map.
I had the same problem of a blank page using dynamic sitemap and STS. I followed your advice and got it working. Then, because I just couldn't stand it, I compared the files to see what the error was. I found it in line 90 of catalog/dynamic_sitemap.php:
If you are using STS and getting a blank site map page, you just need to change line 90 from:
<?php //require(DIR_WS_INCLUDES . 'column_right.php'); ?>
to:
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
In other words, uncomment the require.
#372
Posted 23 October 2006, 15:09
I just installed Dynamic Sitemaps and so far so good.
I have a number of links in a box of the form
'<a href="' . tep_href_link(FILENAME_PAYMENT) . '#splitpayment">' . BOX_PAYMENT_SPLITPAYMENT . '</a><br>' .
where the #splitpayment specifies this named anchor on the page:
<h2><a class="dest" name="splitpayment">Pay in 3 installments!</a></h2>
On the site map link however, the link only goes to the page, without going to the named anchor:
The problem is, in other words, the #splitpayment is ignored.
I tried changing the above to:
'<a href="' . tep_href_link(FILENAME_PAYMENT . '#splitpayment') . '">' . BOX_PAYMENT_SPLITPAYMENT . '</a><br>' .but that only made the link disappear altogether from the site map. (In the box its still there and still works)
Any ideas? Help appreciated.
This is more to help users than for SEO. (Probably not interesting to have different sections of the same page listed for SEO. I guess.)
-i.
ms2fr, Header Tags 2.5.5b, Order logging before payment, Better PayPal Description perso, Free shipping per product, Must agree to terms, Country State Selector, World Zones, Visible countries, Store Pick Up, several shipping modules, Personal Invoice Number, 'On the Fly' Auto Thumbnailer using GD Library, More_Pics_6 for 2.2 ms2, Ultimate SEO URLs 2-2.1d/e,Virement Bancaire, Estimated Shipping 1.5, xml_guide, SP+,Step By Step 1.8, Order Editor 2.6.3, Google Analytics, Dynamic Sitemap 2.0, OSC-Expeditor, Recover Cart Sales, Links Manager 1.15
local : linux 2.6 Fedora Core 3, server : APACHE 2.0.54, MySQL 4.1.18, php : 4.4.0 (on strike refuse to update)
remote : IcoOpenBSD 4.x, server : IcodiaSecureHttpd, MySQL 4.1.24, php : 4.4.9
You never get a second chance to make a first impression.
#373
Posted 23 October 2006, 18:14
changed in catalog/includes/modules/dynamic_sitemap.php
else if ($posStart = strpos($fp[$idx], "FILENAME") !== FALSE)
{
$str = str_replace("'<a href=\"' . tep_href_link(", "", $fp[$idx]);
$str = str_replace("\$info_box_contents[] = array('text' => ", "", $str);
$parts = explode(")", $str);
$parts[0] = trim($parts[0]);
$boxParts = explode(".", $parts[1]);
$boxParts[2] = trim($boxParts[2]);
if (tep_not_null($boxParts[2]))
{
$boxHeading[$ctr]['filename'][] = getFileName($pathFileName, $parts[0]);
$boxHeading[$ctr]['boxtext'][] = getBoxText($pathLanguage, $boxParts[2]);
}
to
else if ($posStart = strpos($fp[$idx], "FILENAME") !== FALSE)
{
$str = str_replace("'<a href=\"' . tep_href_link(", "", $fp[$idx]);
$str = str_replace("\$info_box_contents[] = array('text' => ", "", $str);
$parts = explode(")", $str);
$parts[0] = trim($parts[0]);
echo 'parts[0] = ' . $parts[0] . '<br>';
$filenameWithNamedAnchorParts = explode(".", $parts[0]);
echo 'first part of link: $filenameWithNamedAnchorParts[0] = ' . $filenameWithNamedAnchorParts[0] . '<br>';
echo 'second part of link: $filenameWithNamedAnchorParts[1] = ' . $filenameWithNamedAnchorParts[1] . '<br>';
$boxParts = explode(".", $parts[1]);
$boxParts[2] = trim($boxParts[2]);
if (tep_not_null($boxParts[2]))
{
// $boxHeading[$ctr]['filename'][] = getFileName($pathFileName, $parts[0]); //original
$returnedFilename = getFileName($pathFileName, $filenameWithNamedAnchorParts[0]);
$filenameWithNamedAnchor = ($filenameWithNamedAnchorParts[1] <> '' ? $returnedFilename. '.' . $filenameWithNamedAnchorParts[1] : $returnedFilename);
$boxHeading[$ctr]['filename'][] = $filenameWithNamedAnchor;
// $boxHeading[$ctr]['filename'][] = (getFileName($pathFileName, $parts[0])) . $filenameWithNamedAnchorParts[1];
echo 'filename with named anchor if exists: ' . $filenameWithNamedAnchor . '<br>';
echo 'filename from $parts[0]= ' . getFileName($pathFileName, $parts[0]). '<br>';
echo 'filename from $filenameWithNamedAnchorParts[0] = ' . getFileName($pathFileName, $filenameWithNamedAnchorParts[0]). '<br><br>';
$boxHeading[$ctr]['boxtext'][] = getBoxText($pathLanguage, $boxParts[2]);
}
and the first bug is that getFileName is not getting the filename even though the string $filenameWithNamedAnchorParts[0] looks right :
output:
Quote
first part of link: $filenameWithNamedAnchorParts[0] = FILENAME_PAYMENT
second part of link: $filenameWithNamedAnchorParts[1] = '#splitpayment'
filename with named anchor if exists: . '#splitpayment'
filename from $parts[0]=
filename from $filenameWithNamedAnchorParts[0] =
parts[0] = FILENAME_SHIPPING
first part of link: $filenameWithNamedAnchorParts[0] = FILENAME_SHIPPING
second part of link: $filenameWithNamedAnchorParts[1] =
filename with named anchor if exists: shipping.php
filename from $parts[0]= shipping.php
filename from $filenameWithNamedAnchorParts[0] = shipping.php
2nd bug, have to remove '' from anchor.
Thanks in advance for the string tutorial I obviously need.
-i
Edited by IndiaStarker, 23 October 2006, 18:16.
ms2fr, Header Tags 2.5.5b, Order logging before payment, Better PayPal Description perso, Free shipping per product, Must agree to terms, Country State Selector, World Zones, Visible countries, Store Pick Up, several shipping modules, Personal Invoice Number, 'On the Fly' Auto Thumbnailer using GD Library, More_Pics_6 for 2.2 ms2, Ultimate SEO URLs 2-2.1d/e,Virement Bancaire, Estimated Shipping 1.5, xml_guide, SP+,Step By Step 1.8, Order Editor 2.6.3, Google Analytics, Dynamic Sitemap 2.0, OSC-Expeditor, Recover Cart Sales, Links Manager 1.15
local : linux 2.6 Fedora Core 3, server : APACHE 2.0.54, MySQL 4.1.18, php : 4.4.0 (on strike refuse to update)
remote : IcoOpenBSD 4.x, server : IcodiaSecureHttpd, MySQL 4.1.24, php : 4.4.9
You never get a second chance to make a first impression.
#374
Posted 24 October 2006, 09:36
IndiaStarker, on Oct 23 2006, 08:14 PM, said:
changed in catalog/includes/modules/dynamic_sitemap.php
...
and the first bug is that getFileName is not getting the filename even though the string $filenameWithNamedAnchorParts[0] looks right :
...
2nd bug, have to remove '' from anchor.
...
OK I fixed it. Problem resolved with trim. Also erroneous . (a third bug) no longer added to named anchor string.
*** SOLUTION ***
Here is the final code to handle links containing named anchors in boxes such as:
'<a href="' . tep_href_link(FILENAME_PAYMENT . '#splitpayment') . '">' . BOX_PAYMENT_SPLITPAYMENT . '</a><br>' .
Replace
else if ($posStart = strpos($fp[$idx], "FILENAME") !== FALSE)
{
$str = str_replace("'<a href=\"' . tep_href_link(", "", $fp[$idx]);
$str = str_replace("\$info_box_contents[] = array('text' => ", "", $str);
$parts = explode(")", $str);
$parts[0] = trim($parts[0]);
$boxParts = explode(".", $parts[1]);
$boxParts[2] = trim($boxParts[2]);
if (tep_not_null($boxParts[2]))
{
$boxHeading[$ctr]['filename'][] = getFileName($pathFileName, $parts[0]);
$boxHeading[$ctr]['boxtext'][] = getBoxText($pathLanguage, $boxParts[2]);
}
with: else if ($posStart = strpos($fp[$idx], "FILENAME") !== FALSE)
{
$str = str_replace("'<a href=\"' . tep_href_link(", "", $fp[$idx]);
$str = str_replace("\$info_box_contents[] = array('text' => ", "", $str);
$parts = explode(")", $str);
$parts[0] = trim($parts[0]);
//echo 'parts[0] = ' . $parts[0] . '<br>';
$filenameWithNamedAnchorParts = explode(".", $parts[0]);
$filenameWithNamedAnchorParts[0] = trim($filenameWithNamedAnchorParts[0]);
$filenameWithNamedAnchorParts[1] = trim($filenameWithNamedAnchorParts[1], " '");
//echo 'first part of link: $filenameWithNamedAnchorParts[0] = ' . $filenameWithNamedAnchorParts[0] . '<br>';
//echo 'second part of link: $filenameWithNamedAnchorParts[1] = ' . $filenameWithNamedAnchorParts[1] . '<br>';
$boxParts = explode(".", $parts[1]);
$boxParts[2] = trim($boxParts[2]);
if (tep_not_null($boxParts[2]))
{
// $boxHeading[$ctr]['filename'][] = getFileName($pathFileName, $parts[0]); //original
$returnedFilename = getFileName($pathFileName, $filenameWithNamedAnchorParts[0]);
$filenameWithNamedAnchor = ($filenameWithNamedAnchorParts[1] <> '' ? $returnedFilename . $filenameWithNamedAnchorParts[1] : $returnedFilename);
$boxHeading[$ctr]['filename'][] = $filenameWithNamedAnchor;
// $boxHeading[$ctr]['filename'][] = (getFileName($pathFileName, $parts[0])) . $filenameWithNamedAnchorParts[1];
//echo 'filename with named anchor if exists: ' . $filenameWithNamedAnchor . '<br>';
//echo 'filename from $parts[0]= ' . getFileName($pathFileName, $parts[0]). '<br>';
//echo 'filename from $filenameWithNamedAnchorParts[0] = ' . getFileName($pathFileName, $filenameWithNamedAnchorParts[0]). '<br><br>';
$boxHeading[$ctr]['boxtext'][] = getBoxText($pathLanguage, $boxParts[2]);
}
-i.
ms2fr, Header Tags 2.5.5b, Order logging before payment, Better PayPal Description perso, Free shipping per product, Must agree to terms, Country State Selector, World Zones, Visible countries, Store Pick Up, several shipping modules, Personal Invoice Number, 'On the Fly' Auto Thumbnailer using GD Library, More_Pics_6 for 2.2 ms2, Ultimate SEO URLs 2-2.1d/e,Virement Bancaire, Estimated Shipping 1.5, xml_guide, SP+,Step By Step 1.8, Order Editor 2.6.3, Google Analytics, Dynamic Sitemap 2.0, OSC-Expeditor, Recover Cart Sales, Links Manager 1.15
local : linux 2.6 Fedora Core 3, server : APACHE 2.0.54, MySQL 4.1.18, php : 4.4.0 (on strike refuse to update)
remote : IcoOpenBSD 4.x, server : IcodiaSecureHttpd, MySQL 4.1.24, php : 4.4.9
You never get a second chance to make a first impression.
#375
Posted 26 October 2006, 13:30
#1) In my bottom right I have two red dots with nothing next to them, how I can remove those two red dots of nothing?
#2) How can I change the text of the links text. Some of them are like "Get Them While They" Is this possible to change the text name without dissrupting the actual file?
Thanks and things look good so far on my site!
My site map link
Nigelman
Edited by Tsuri Japan, 26 October 2006, 13:32.
#376
Posted 26 October 2006, 15:44
As for the text, that is taken from the english file, like english/wishlist.php. You can change it there to see how it works.
Jack
Most Important: Header Tags SEO - Ultimate SEO V 2.2d
All SEO Addons: Recommended SEO Addons
Support Links:
Finding relevant link exchanges - Headers Already Sent - What does it cost? -What's my version? - How to change titles? - Preventing HotLinking
#377
Posted 26 October 2006, 17:02
The text I was able to edit in the includes/languages/english/.....File.php and simply changed the title to something more meaningful.
Also I found an error in the dynamic_sitemap.php file that had a text mistake that wasn't allowing the right colum to appear. I've updated in the contribs section. I'm no coder but I know an error when I see one.
Oh one more question, how do I make the right be alphabetically organized like the left side? Kind of makes sense to have it the same for the customber right?
Other than that mine is perfect and I'm very happy, thanks for all the hard work and cheers!
Nigelman
Edited by Tsuri Japan, 26 October 2006, 17:05.
#378
Posted 26 October 2006, 18:23
Jack
Most Important: Header Tags SEO - Ultimate SEO V 2.2d
All SEO Addons: Recommended SEO Addons
Support Links:
Finding relevant link exchanges - Headers Already Sent - What does it cost? -What's my version? - How to change titles? - Preventing HotLinking
#379
Posted 26 October 2006, 18:33
#380
Posted 27 October 2006, 05:14
Jack_mcs, on Oct 27 2006, 03:23 AM, said:
Jack
Jack no worries and thanks for explaining my error, next time I'll just upload the whole package. Yes I know what you mean when there's so many different addons and extras it gets so dam confusing. I mean how hard is it just to replace the one file and upload it the whole package....next time I will for sure!
Oh one thing I found out. If you have any commas in your title description it will cut off from the comma. So in the default "Get them while they're hot" it will show like "Get them while they" In order to change this just go into your includes/languages/english/yourfiletochange.php file, you should see the text to change.
Hope this helps because I saw others who were having this problem and not getting any answears.
Nigelman














