cancel
Showing results for 
Search instead for 
Did you mean: 

Add product call to menu

Add product call to menu

Hello

 

I am trying to add to the code below so that I can also include a case for 'product' and then link directly to a product via my xml..

 

Any help really appreciated

 

 

switch ($type) {

            case 'Category' :
                $url = Mage::getModel("catalog/category")->load($id)->getUrl();
                break;
            default: 
                $url = Mage::helper('cms/page')->getPageUrl($id);
        }