Try Now
More in this section

Forums / Sitefinity SDK / Products and more...

Products and more...

4 posts, 0 answered
  1. Daniel Plomp
    Daniel Plomp avatar
    112 posts
    14 Jun 2012
    18 Feb 2011
    Link to this post

    I need some more functionality in my system then only a 'Product'.
    How can I add a product that has;

    1. a 'Product group' assigned to it
    2. a relation with one or more 'Nutritional values' (many-to-many)
    3. a relation with one or more 'Categories' (many-to-many) / no built-in taxonomies

    Is this possible to build in Sitefinity? Including translations into different languages and maintenance in the backend?

  2. jocelyn payneau
    jocelyn payneau avatar
    51 posts
    07 Dec 2009
    19 Feb 2011
    Link to this post
    Hi Daniel,

    For a project i'm currently developing, i have to manage 1 to many relationships and many-to-many relationships.

    To do this, you must manage all your content in custom modules (like product catalog sample).

    So in your case, you will create a custom module to manage Nutritional values (or do you want to use taxonomies?).
    In the model of your product module, you will add a code like this:
    private TrackedList<Guid> nutrionalValues;
    public TrackedList<Guid> NutrionalValues
    {      get
                if (this.nutrionalValues== null)
                    this.nutrionalValues= new TrackedList<Guid>();
                return this.nutrionalValues;
                var nv = this.NutrionalValues;
                foreach (var id in value)

    In your manager, in the copy method, you must add this line:
    destination.NutrionalValues = source.NutritionalValues;

    It is the same for your Categories.

    If you use taxonomies for 'Nutrional values', you can create the taxonomy in the installation method of your module. If you want to use taxonomies, i can explain how to do this.

    So you can build this in sitefinity. You can support translations into different languages, workflows...

    You should use a module based on product catalog sample.

    Hope this helps.

  3. Daniel Plomp
    Daniel Plomp avatar
    112 posts
    14 Jun 2012
    21 Feb 2011
    Link to this post
    Hi Jocelyn,

    Thanks for the explanation.
    So how do you know when your dealing with a 1-n or a n-n relation? Is this something you can set?

    I'll think I'll start with a Product module and a ProductGroup module...

    Is it possible to have a menu item like 'Content' but then 'Products' and beneath this 'Products', 'Product groups' etc.?

  4. Denis
    Denis avatar
    105 posts
    27 Feb 2009
    02 Mar 2013 in reply to Daniel Plomp
    Link to this post


    I'm wondering if you was able to setup many-to-many relation between products and categories custom modules. I Think it should be implemented similarly to what ModuleBuilder does for "array of Guids" fields.


4 posts, 0 answered