Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Storing custom data

Vote:
 

We would like to achieve this functionality: for each order we want to associate a store and a time slot in which the product can be collected.

We also like to manage the stores and the slots available for each store in the cms (for example adding the slots to a store like you add users to a group in windows)

What would be the best way to achieve this? Storing objects in Business Foundation or dynamic data storage, or is it better to have a custom database and admin tool?

Examples or pointers to the right direction are welcome :-)

 

#51342
Jun 02, 2011 19:01
Bode0077 - Jan 02, 2022 11:21
How can i activate website an collect data's??
Vote:
 

Ok we found that it is possible to store the data with custom entities using Business Foundation.

The only problem is that a many to many relationship does not seem to work as we would like it to work.
A "store" can have many "time slots" (in which orders can be collected) and a "time slot" can be used in many "stores".

So we would like to show an editable list of slots on the edit store Form. It could look like this:
http://msdn.microsoft.com/en-us/library/Aa167285.405riordan1%28l=en-us,v=office.11%29.jpg

What would be the best way to achieve this?

#51362
Jun 03, 2011 16:38
Vote:
 
How can i activate website an collect data's??
#269312
Jan 02, 2022 11:22
Vote:
 

You'll want to extend the PurchaseOrder to persist a 'store' and 'collection date': https://world.optimizely.com/documentation/developer-guides/commerce/orders/Extending-order-classes/

For managing a list of stores / available time slots, you could create a custom table in the episerver commerce database or you could store them as a cms page / blocks. Depends on how you want to surface the data with your other features.

#270646
Jan 27, 2022 7:56
Vote:
 

Hello @Cedric, I would also use business foundation for creating stores. Either you can create a new entity or use existing entity Organization as store. Either way should work. However, for time slots you can use two different ways, create a custom entity as you have already created or use multi select MetaEnums. Using mutli select MetaEnums you can populate the meta enums as a multi select checkbox on your stores easily and store them accordingly. Or else create custom meta fields on your store to show all our custom entity (time slots) as multi select checkbox and while storing the data in stores, store their ids instead of creating reference between them. If you avoid using reference, then you will be able to avoid the many to many relationship problem.

Good luck!

~ Sujit

#271235
Feb 06, 2022 19:13
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.