Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hello
I hope my title makes some kind of sense :)
What I want to do is manipulate the SiteContext, CurrentCategory.
Basicly I want to do the following, this is only some example code for test purposes:
Category MyCat = new Category();Product nP1 = new Product();Product nP2 = new Product();List<Product> lPro = new List<Product>();lPro.Add(nP1);lPro.Add(nP2);MyCat.Products = lPro;SiteContext.Current.CatalogContext.CurrentCategory = MyCat;
My problem is that the Category.Products does not have a setter, so how would I be able to do this?
Any help is appreciated.
Thanks
There's an AddProduct on category. I think that would do the trick?
Damn! Your right... I really do not know how I missed that :-S
Sometimes it is better to take a break, when you start missing the obvious.
Hah!
Usually when that barrier is reached, i go eat cake. Actually. Some of my collegues have an Epephany duck they talk to. You know. When you ask for questions you sometimes see it yourself.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
SiteContext - CurrentCategory, custom Category, assign Products
Hello
I hope my title makes some kind of sense :)
What I want to do is manipulate the SiteContext, CurrentCategory.
Basicly I want to do the following, this is only some example code for test purposes:
My problem is that the Category.Products does not have a setter, so how would I be able to do this?
Any help is appreciated.
Thanks
There's an AddProduct on category. I think that would do the trick?
Damn! Your right... I really do not know how I missed that :-S
Sometimes it is better to take a break, when you start missing the obvious.
Hah!
Usually when that barrier is reached, i go eat cake. Actually. Some of my collegues have an Epephany duck they talk to. You know. When you ask for questions you sometimes see it yourself.
is working on a reply...