I am new to Umbraco and UCommerce so please forgive me if this is a simple question.
So I have Umbraco 7 installed along with UCommerce 6.0.1.14120. I also installed the Razor Store Demo, plus built my own store. I am using the MVC rendering engine. In both stores, anytime I try to get the CurrentCategory, from SiteContext.Current.CatalogContext.CurrentCategory, it always returns null.
I can provide more details if necessary. Does anyone have any ideas on why this could be happening? I can get all of my categories fine by using UCommerce.Api.CatalogLibrary.GetRootCategories();
Hi Nickolaj, I am trying to get to localhost:5244/shop/catalog. This is the default url for the "catalog" that came in the content section when I installed the demo razor store. Its not big deal if I can't resolve this as I have came up with another way to handle my navigation through the store (although sadly this was using parameters in custom routes which isn't supported either, so now on to using a url rewriter).
localhost:5244/shop/catalog
Doesn't have any CurrentCategory because the URL doesn't contain any category information ( fx. /c-1/c-2/p-3, linking to catalog id 1, category id 2 and product id 3).
SiteContext.Current.CatalogContext.CurrentCategory always returns NULL
I am new to Umbraco and UCommerce so please forgive me if this is a simple question.
So I have Umbraco 7 installed along with UCommerce 6.0.1.14120. I also installed the Razor Store Demo, plus built my own store. I am using the MVC rendering engine. In both stores, anytime I try to get the CurrentCategory, from SiteContext.Current.CatalogContext.CurrentCategory, it always returns null.
I can provide more details if necessary. Does anyone have any ideas on why this could be happening? I can get all of my categories fine by using UCommerce.Api.CatalogLibrary.GetRootCategories();
Thanks!
What's the URL you are trying to get
SiteContext.Current.CatalogContext.CurrentCategory
from?Hi Nickolaj, I am trying to get to localhost:5244/shop/catalog. This is the default url for the "catalog" that came in the content section when I installed the demo razor store. Its not big deal if I can't resolve this as I have came up with another way to handle my navigation through the store (although sadly this was using parameters in custom routes which isn't supported either, so now on to using a url rewriter).
Thanks!
Wow, that was pretty dumb haha. Thanks for your help though man, I am getting a better feel for Umbraco everyday.
We have all been there!
Keep trying (and asking, when you get stuck) :)
is working on a reply...