title: Implementing SEO friendly URLs in Sitecore-uCommerce
body: <p>I am implementing a default Sitecore-uCommerce SEO friendly URLs mechanics and I run into issues.</p>
  
  <p>I looked into ItemResolver processor of uCommerce and I still do not understand how uCommerce sets the Sitecore Context Item. It seems like it uses an uCommerce Item's Guid for Sitecore.Context.Item. Somehow it is not the case, but I do not see the real Sitecore Item to be set as Context item. And uCommerce items do not have the layout details on them. Or am I wrong?</p>
  
  <pre class="lang-cs prettyprint-override"><code>private ID FindSitecoreIdForProduct(int productId)
  {
      IRepository&lt;Product&gt; repository = ObjectFactory.Instance.Resolve&lt;IRepository&lt;Product&gt;&gt;();
      Product product = repository.Get(productId);
      if (product != null)
      {
          return new ID(product.Guid);
      }
      return ID.Null;
  }
  </code></pre>
  
  <p>Then it makes </p>
  
  <pre class="lang-cs prettyprint-override"><code>ID iD = this.FindSitecoreIdForProduct(productId);
  if (iD == ID.Null)
  {
      return;
  }
  Context.Item = Context.Database.GetItem(iD);
  </code></pre>
  
  <p>I would like it to be a specific Sitecore Item with a rendering showing the product details. The URLs are of type </p>
  
  <pre><code>http://sitename.com/productdetailpage/productname/c-25/p-125
  </code></pre>
  
  <p>If you could just explain me how uCommerce gets to the real Sitecore Item and sets it as a Context.Item, I guess it will be enough for me.</p>