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
We're trying to create a simple product catalog for around 200 products. We don't need any ecommerce so some of the packages I've seen seem like overkill for our requirements. We're trying to keep things really simple.
Our products can appear in multiple categories so I assume we need separate nodes for each Products and Categories. What would be the best way to configure these relationships?
Additionally, the Products will require Variants each with a number of Attributes. I thought we could create document types for each of the following: Variant, Attribute and Attribute Value. Therefore a Product Variant could have multiple Attributes (colour, size, weight etc..) each with Attribute Values associated with each them (colour: Red, Blue Green). Can this be acheived using MNTP's or other in-built property editors?
My initial attempt at modelling this structure looks like this:
The Product has a MNTP's to select categories and Variants but I'm struggling to figure out a ways to setup the relationships between Variants, Attributes and Attribute Values.
As a side note, am I better to create this Catalog structure outside of the root node? I don't want to allow navigation to the Variants, Attributes etc.. So should I create a Catalog node at root level and put all these document types under there? If so how would I create the navigation for the Products and Categories under the Home node?
Sorry for the length of this post. It may me a lot more complex than I'd hoped and I may be going about this completely the wrong way but Umbraco is still quite new to me so I guess I'll learn from my mistakes. :)
Thanks for any help you can give me.
Here's my thoughts.
As a product can belong to multiple categories. I would essentially want to be able to 'Tag' products with a category.
A category could be as simple as a text tag using something like the Checkbox list or, like you have said, it could be a whole document type that could be potentially browsed to.
As you also said, the editor can use the Multiple Node Picker to select these on the product. If you go with this approach then I would probably use the Category document type to organize my catalog content tree. I would have a Category node at the root level, called 'Catalog Root' or something. A Category would be able to have children of type 'Category' or 'Product' defined using the 'Permissions' section on document type. The category my product actually sits underneath would be its primary category, but I would still be able to associate it with other categories using the multiple node picker its just a cleaner way to organize my catalog.
Coming onto variants... I would lean towards having a base document type called 'variant' which would define the obvious things like 'price', 'sku', 'images' etc. Then depending on the various types of products you are selling I would define these different types of variants as different document types inheriting from your base variant doc type. This way you could stop worrying about having attributes and attributes values because these are essentially what your properties are on the doc types. The different variant types and their properties would give you what your trying to achieve with attributes and attribute values...think instead 'Property' and 'Property Values'
Arguably - Genre could be the category - but you get the idea
You could then take this further by having different Product DocTypes, this way you could control what variant types are allowed to be created under which product types using the permissions section. You could even route to a different view template based on the product type giving you huge flexibility.
Below is a screenshot of what I knocked up:
Thanks Tom, that really helps point me in the right direction.
On the side note in my question I think I've come to realise how this might be achieved. I beleive I could make a custom IContentFinder implementation that would intercept the request and route to my catalog structure.
I could also leverage a IUrlProvider implementation to create the custom Urls to my catalog content.
These would need registering in the ApplicationStarting event of a custom ApplicationEventHandler class. I've created one in a class library but I can't seem to get this event to fire. Is there something else I need to do to wire this up?
Does the ApplicationEventHandler fire if it is moved into the web project?
Also ensure that your web application in the Global.asax derives from UmbracoApplication as opposed to the default MvcApplication
public class MvcApplication : UmbracoApplication
public class UmbracoApplicationEventHandler : IApplicationEventHandler
public void OnApplicationInitialized(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
public void OnApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
public void OnApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
Hi Tom, yes the ApplicationEventHandler did fire when I moved it to the web project but I managed to get it working in my class library. I was just missing a reference!
Taking me a while to wake up this morning!
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted