How to create a dynamic data-driven product management edito

Posted by Community Admin on 05-Aug-2018 15:39

How to create a dynamic data-driven product management editor

All Replies

Posted by Community Admin on 18-Feb-2014 00:00

Hi There,

I am quite new to Sitefinity, so forgive me if this is an obvious question.

At a basic level I am trying to use the ecommerce module to drive a global product catalogue.   In my case the products are pharmaceuticals with lots of custom fields.

What isn't so basic is that I am wanting to integrate the product entry into other databases that are driven through our enterprise supply chain .

There are databases within our company that tell me which products have regulatory approval in each country, and in what strength.

What I want to do is dynamically adjust the master data shown within the product editor in Sitefinity so that each country can choose from a customized list of products they want to sell, and in what strength.  (Just because we have regulatory approval to sell a drug in a given market doesn't necessarily mean that we want to ... so each country chooses which drugs they want to sell)

To ensure that data is consistent, I want to use the data from our regulatory approval database to drive the available selections within the new product creation in Sitefinity.  For example,

Lets say a particular country wanted to add Ibuprofen to their product catalogue.  They would go into the backend of Sitefinity's ecommerce section and start creating a new product of type "Drug".  The editor for this drug type would first determine what country the user is from (through their account) and then query our regulatory database and see what drugs are available to sell in that market.  These approved drugs would then appear in a drop-down list inside the editor.  If they selected Ibuprofen, the editor would then re-query the regulatory database to populate other fields within the editor such as "Strength", so that only approved strengths are available for the user to select.

I know this is going to require some backend coding because I don't think sitefinty offers this kind of data-driven dynamic editing out of the box.  

I am just wondering if anyone has attempted something like this before, and whether they can point me in the direction of some good resources to help guild me.

Is it even worth trying to customize Sitefinity's ecommerce site to try and make it work this way, or should I just write a completely custom widget?

Many thanks for any advice you may have.

-Sheldon

Posted by Community Admin on 21-Feb-2014 00:00

Hello Sheldon,

You can easily manage product catalogs including generating custom fields.
In order to filter products  you need to inherit ProductsMasterView and implement custom logic (I started the sample at CustomProductsMasterView.zip).

The method that need to be inherited is :

protected virtual IList<Product> GetDataSource();

The replacement of ProductsMasterView with CustomProductsMasterView can be done via configuration under Administration > Settings > Advanced ( screen attached).
Change the ViewType property with the type of the  CustomProductsMasterView .

Let us know if you need further assistant!

Regards,
Milena
Telerik

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
[View:/cfs-file/__key/communityserver-discussions-components-files/299/1c5e8a40_2D00_63fe_2D00_4afe_2D00_bf2e_2D00_1b7bdad3fb05_5F00_CustomProductsMasterView.zip:320:240]

Posted by Community Admin on 21-Feb-2014 00:00

Many thanks!   I'll go through what you have sent ... Sounds like it is close to what we want to do.

This thread is closed