title: Magento - Load product by url
body: <p>How would one load a product model in Magento, if the product id is not available and only the product's url is? For example, I want to retrieve the product model from it's friendly url, such as </p>
  
  <pre><code>electronics/cameras/olympus-stylus-750-7-1mp-digital-camera.html
  </code></pre>
  
  <p>I found the following code in <a href="https://stackoverflow.com/a/7560758/623854">another post</a>:</p>
  
  <pre><code>$oRewrite = Mage::getModel('core/url_rewrite')-&gt;loadByRequestPath(
      $path
  );
  </code></pre>
  
  <p>but it doesn't seem to work correctly. The Magento documentation is very lacking in this area; does anyone know how to accomplish this?</p>