Products and more... - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

Products and more...

  • Products and more...
  • Hi,

    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?

  • 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
                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.

  • 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.?

  • Daniel,

    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.