Juno Wiki & Help‎ > ‎

Shorten URL's

In order to shorten the URL's and generally tidy them, once the Magento admin has been sorted you need to do the following:

  • Make a copy of Url.php (found in: /app/code/core/Mage/Catalog/Model/Url.php)
  • Put the copy into the app/code/local/Mage/Catalog/Model folder, if these folders don't exist make them.
  • Comment out lines : 805,806,807,808 and 810 (see below for reference to what these lines should say, in case you're using a different version)
  • Reindex the data / Clear cache

How lines 805 - 810 should look after you've edited them...

              //  if (null === $parentPath) {
                //    $parentPath = $this->getResource()->getCategoryParentPath($category);
              //  }
             //   elseif ($parentPath == '/') {
                    $parentPath = '';
              //  }

If the lines don't match up to the above, find the lines and amend as shown above. Attached the file also.


ċ
Url.php
(30k)
simon.newbold@junowebdesign.com,
Jun 27, 2012, 1:13 AM
Comments