I have create an Observer function which is call after product save but having some issues with product url.
Getting product like:
$product = $observer->getEvent()->getProduct();
Getting product url path:
**$product->getUrlPath(); //Return empty path** $product->getProductUrl(); //Show error for function
//Finally I have used it
Mage::app()->setCurrentStore('default'); //set the default storeview $url = Mage::helper('catalog/product')->getProductUrl($product->getId()); //get url for .html Mage::app()->setCurrentStore('admin'); //set the admin store again But now the issue is url is shown as : https://local.com/index.php/catalog/product/view/id/290/s/surestep-pro-diabetic-test-strips-50-strips-professional-care/ instead of http://local.com/surestep-pro-diabetic-test-strips-50-strips-professional-care.html
I want product .html url else url_path in observer.