Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

fungicide98

Archived
  • Posts

    2
  • Joined

  • Last visited

Posts posted by fungicide98

  1. Paul, it's ashame you couldn't get the sitemap to work as intended, for the method you implimented sacrifices the shipping.php (intended for shipping information, of course) which many, including myself, find very useful...

     

    :huh:

     

    Sorry, what I meant was I took shipping.php and renamed it to dynamic_sitemap.php, then modified that file so I still have shipping.php :)

  2. Dynamic Sitemap v2.0 with STS

     

    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 changed these two lines near the top:

    require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SHIPPING);
    
    $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_SHIPPING));

    to read

    require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DYNAMIC_SITEMAP);
    
    $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_DYNAMIC_SITEMAP));

     

    Then around line 56 where it has

    <td class="main"><?php echo TEXT_INFORMATION; ?></td>

    I changed that to have the code from dynamic_sitemap.php that displays the sitemap

    <td class="main">
    <?php	require (DIR_WS_CLASSES . 'category_tree.php');	$osC_CategoryTree = new osC_CategoryTree;	echo $osC_CategoryTree->buildTree();?>
     <ul class="sitemap">
    <?php
      if (count($files['name']) > 0) { 
    	for ($b = 0; $b < count($files['name']); ++$b) { 
    ?>			   
    <li><?php echo '<a title="'. $files['name'][$b] .'" href="' . tep_href_link($files['path'][$b]) . '">' . $files['name'][$b] . '</a>'; ?></li>
    <?php 
    	} 
      }				 
      if (count($boxHeading) > 0) {
    	for ($b = 0; $b < count($boxHeading); ++$b) {
    	  echo '<li>'.$boxHeading[$b]['heading'][$b].'</li>';
    ?>
    <ul>
      <?php
    	for ($f = 0; $f < count($boxHeading[$b]['filename']); ++$f)
    	  if (tep_not_null($boxHeading[$b]['filename'][$f]))
    		echo '<li><a title="'. $boxHeading[$b]['boxtext'][$f] .'" href="' . tep_href_link($boxHeading[$b]['filename'][$f]) . '">' . $boxHeading[$b]['boxtext'][$f] . '</a></li>';
      ?>
    </ul>
    <?php
    	  }
    	}
    ?>
     </ul>
    </td>

     

    And to get rid of the continue button I deleted lines 63-75

    	  <tr>
    	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
    	  <tr class="infoBoxContents">
    		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
    		  <tr>
    			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
    			<td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
    			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
    		  </tr>
    		</table></td>
    	  </tr>
    	</table></td>
      </tr>

     

    Hope that works for other people.

     

    Paul

×
×
  • Create New...