I am using Magento 1.9.
I will get a url from the request. I have to find product/category id from the url.
I have tried these :-
But I am getting empty result.
Array ( [store_id] => 1 [url_rewrite_id] => )
I have tried it like this :-
$url = '/product-name1728202.html'/'category-name';
(The first one is a product url and the second one is a category url and I will get any one of them).
$oRewrite = Mage::getModel('core/url_rewrite') ->setStoreId(Mage::app()->getStore()->getId()) ->loadByRequestPath($url);
I am getting the result I mentioned above regardless I have either product or category url. What do I do. I am not finding any other solution for this. Please help.