Add uCommerce Catalog Tree to Umbraco's Multi Node Tree Picker
Hello all,
I already posted this in the general umbraco section but I figured I should post it here as well. I am trying to extend the Multi Node Tree Picker (MNTP) in Umbraco but am running into some trouble. I am used to writing property editors in the new umbraco 7 angular style, so the MNTP is a bit foreign to me. I want to be able to connect my uCommerce Catalog Tree to the MNTP. I feel like this should be fairly simple as all that I should need to do is hook up the uCommerce tree to the MNTP. I am in the Umbraco.Web.PropertyEditors dll, but it isn't really helping me too much. Any pointers to get me started in the right direction would be much appreciated. I could then share this as a new package if I can get it working.
YesterdayI discovered that there is a uCommerce Multi Item Tree Picker. It developed by Christian M. Eriksen and it´s for version 6 and not 7 unfortunately. Maybe you can get some inspiration from that package how you can do it. I know that the new Umbraco 7 is using AngularJS.
As I said hope this package can point you in the right direction on how you can do it, or maybe you could try contact Christian M. Eriksen, and make some collaboration together to get the existing uCommerce Multi Item Tree Picker package working in Umbraco 7. http://our.umbraco.org/projects/backoffice-extensions/ucommerce-multi-item-tree-picker
Hope these inputs could be useful to you at some point.
We're actively working on a data type for Umbraco 7, which will enable you to pick catalog groups, catalogs, categories, or products depending on how it's configured. It will be able with the next release of v6.
I noticed there is a uCommerce picker property editor registered as a datatype. When configuring this datatype you have the option to select a "Selector" and a "Tree" in a textbox.
However, I can't find any documentation about this and what to fill in here to get this working...
I have the (quite common I guess) case, where a content item relates one or more products (or categories). I would like the editor to pick the products (or categories) that the content item applies to so that, when the product is rendered, a list of related content items can be displayed.
The functionality is quite generic, but think content items as events, news items, whitepapers or press releases.
I have set a picker as a property on my startpage in the cms. Now i want to retreive the values from it in the backend code, like for example:
CurrentPage.GetProperty("productGroupSliderPicker");
Can I cast the result from this to some kind of type, so that I for example can iterate over all picked products etc.
What you get from the value is just a comma seperated list of Ids. You have a few possible ways forward from here. Depending on what information you need, you could resolve a IRepository<Product> and use select with a ProductViewByProductIdsQuery. Its an ICannedQuery, so you can use that interface to create your own version that returns the data you need. It has a single method called Execute that takes a session. The idea is that it returns an enumerable so when you executes it, it loads up the data you need.
Another approach is to use RavenDB to query on the documents. You will get a "Document Product" back, which right now is not part of the official API since we primarely use it for Faceted Search. But it will be faster that using the Entities approach. You can use SearchLibrary.FacetedQuery() which will give you a Queryable you can use. Do remember that RavenDB only returns 128 results, so if you want more, you need to specify Take(). Its called a FacetedQuery because you can append a list of facets aswell - but not a requirement.
Hope that answers the question. Otherwise let me know :)
Add uCommerce Catalog Tree to Umbraco's Multi Node Tree Picker
Hello all,
I already posted this in the general umbraco section but I figured I should post it here as well. I am trying to extend the Multi Node Tree Picker (MNTP) in Umbraco but am running into some trouble. I am used to writing property editors in the new umbraco 7 angular style, so the MNTP is a bit foreign to me. I want to be able to connect my uCommerce Catalog Tree to the MNTP. I feel like this should be fairly simple as all that I should need to do is hook up the uCommerce tree to the MNTP. I am in the Umbraco.Web.PropertyEditors dll, but it isn't really helping me too much. Any pointers to get me started in the right direction would be much appreciated. I could then share this as a new package if I can get it working.
Thanks!
Hi Logan,
Yesterday I discovered that there is a uCommerce Multi Item Tree Picker. It developed by Christian M. Eriksen and it´s for version 6 and not 7 unfortunately. Maybe you can get some inspiration from that package how you can do it. I know that the new Umbraco 7 is using AngularJS.
As I said hope this package can point you in the right direction on how you can do it, or maybe you could try contact Christian M. Eriksen, and make some collaboration together to get the existing uCommerce Multi Item Tree Picker package working in Umbraco 7. http://our.umbraco.org/projects/backoffice-extensions/ucommerce-multi-item-tree-picker
Hope these inputs could be useful to you at some point.
/Dennis
Hi Dennis,
Thanks for the reply! I will look into the source code from that and see if I can get some inspiration to make an angular version of it for Umbraco 7.
Thanks!
Hi Logan,
We're actively working on a data type for Umbraco 7, which will enable you to pick catalog groups, catalogs, categories, or products depending on how it's configured. It will be able with the next release of v6.
Great news to hear Soren! Any idea on when the next release of v6 will be? We are launching the current site that I am building in October.
We're a few weeks away from general availability. You'll have in plenty time.
Hi There Søren,
Any news on the picker thing?
I am also very interested in this functionality. Søren: Please give us some information. :)
I noticed there is a uCommerce picker property editor registered as a datatype. When configuring this datatype you have the option to select a "Selector" and a "Tree" in a textbox.
However, I can't find any documentation about this and what to fill in here to get this working...
Hi Marcelh, you can configure it to pick basically anything from the catalog. Can you elaborate on what you want to achieve?
I have the (quite common I guess) case, where a content item relates one or more products (or categories). I would like the editor to pick the products (or categories) that the content item applies to so that, when the product is rendered, a list of related content items can be displayed.
The functionality is quite generic, but think content items as events, news items, whitepapers or press releases.
You can configure it to select products like so:
Tree (what tree should be showed) should be configured to: Products
Selector is the type you want to be able to select.
Should be set to:
productVariant, product,productCategory,productCatalogGroup,productCatalog
Nice, will give it a try! Thanks for this undocumented feature ;-)
There should be easter eggs for our users to go for explore journeys ;)
Hi all,
I have set a picker as a property on my startpage in the cms. Now i want to retreive the values from it in the backend code, like for example:
CurrentPage.GetProperty("productGroupSliderPicker");
Can I cast the result from this to some kind of type, so that I for example can iterate over all picked products etc.
Thanks
/Johan
Hi Johan,
What you get from the value is just a comma seperated list of Ids. You have a few possible ways forward from here. Depending on what information you need, you could resolve a IRepository<Product> and use select with a ProductViewByProductIdsQuery. Its an ICannedQuery, so you can use that interface to create your own version that returns the data you need. It has a single method called Execute that takes a session. The idea is that it returns an enumerable so when you executes it, it loads up the data you need.
Another approach is to use RavenDB to query on the documents. You will get a "Document Product" back, which right now is not part of the official API since we primarely use it for Faceted Search. But it will be faster that using the Entities approach. You can use SearchLibrary.FacetedQuery() which will give you a Queryable you can use. Do remember that RavenDB only returns 128 results, so if you want more, you need to specify Take(). Its called a FacetedQuery because you can append a list of facets aswell - but not a requirement.
Hope that answers the question. Otherwise let me know :)
Best regards
Morten
is working on a reply...