This is a discussion on Dynamic SiteMap V 1.0 within the New osCommerce Contributions forums, part of the osCommerce 2.2 Forums category; If you want to have category links to be suitable and compatible with breadcrumb and other contribs (like some categories ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| ||||
| ||||
| If you want to have category links to be suitable and compatible with breadcrumb and other contribs (like some categories box enhancments and similar), which means to have complete links including the parent categories, you just need to make these few minor changes included below. AUTHORS: wizaard (if) and funous (the others) ;) ------------------------------------------------------------- HOW TO? CHANGES TO catalog/includes/classes/category_tree.php ------------------------------------------------------------- REPLACE: function buildBranch($parent_id, $level = 0) { WITH: function buildBranch($parent_id, $level = 0, $p_category_link = false) { ADD BELOW FOREACH FUNCTION (around line 23): if ($parent_id == '0') { $category_link = $category_id; } else { $category_link = $p_category_link . '_' . $category_id; } REPLACE: $result .= $this->buildBranch($category_id, $level+1);} WITH: $result .= $this->buildBranch($category_id, $level+1, $category_link);} --------------------------------------------------------------- THE END, ENJOY More...
__________________ Michael Sasek osCMax Developer
|
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Dynamic SiteMap V 1.0 | michael_s | New osCommerce Contributions | 0 | 07-06-2007 05:12 AM |
| Dynamic SiteMap V 1.0 | michael_s | New osCommerce Contributions | 0 | 07-02-2007 03:03 PM |
| Google XML Sitemap w/ Admin | michael_s | New osCommerce Contributions | 0 | 05-07-2007 03:01 AM |
| Dynamic SiteMap V 1.0 | michael_s | New osCommerce Contributions | 0 | 03-22-2007 07:51 AM |
| Google XML Sitemap w/ Admin | michael_s | New osCommerce Contributions | 0 | 03-07-2007 11:10 AM |