First thing to consider really is the user experience - how are you creating/updating the information? Are you allowing members to edit their information? How are you displaying it to members? Can backend users edit it?
If I were you, I'd probably create a custom data type to display the information, (and edit if necessary); it sounds like you'll be creating the data using the shopping cart experience so you probably don't want anyone editing it after the fact?
There is no UI (user experience) for the end-user, for them to edit or even 'present/see' this information.
Its more to do with checking the subscription duration per the category they subscribed to, so this check will be on back-end razor while the content is being accessed;
I really need something simple, like a list format (subscriptionCategory, Duration, StartDate), to retrieve and check this data. Easy to use with Razor sorta thing.
What would you suggest, without going to custom data type route?
If you don't want to create your own DataType and the list is relatively short - given you have only 3 fields then NestedContent is probably going to fit your requirements.
When it comes to generating NestedContent values programmatically, take a look at this:
Thanks for pointing out the NestedContent, not sure why I didnt notice this before.
There is some serious code in the git you posted : )
I have created a simple nested datatype, assigned to a memberType.
Within the code how should I go about casting it properly as member.getvalue is not like a model;
@using umbraco.cms.businesslogic.member
@{
var member = new Member(1129);
var email = member.Email;
var someProperty = member.getProperty("myCustomProperty").Value.ToString();
}
What would be the right approach to get (and also set) to the member nested-dataype in this case?
What is the ideal data-type for storing subscription info
I am working on a shopping cart implementation which contains different categories, where each category can have various subscription period.
While storing the subscription data to Member's which data-type do you think will be the ideal, easy to work with?
For each subscription, it needs to write;
.SubscriptionType1, .Period1, .Start Date1
.SubscriptionType2, .Period2, .Start Date2 ..
I'm not sure which data type would be ideal and easy to write/read from. ArcheType might be an overkill, just not sure...
Would be interested to hear your thoughts on this.
First thing to consider really is the user experience - how are you creating/updating the information? Are you allowing members to edit their information? How are you displaying it to members? Can backend users edit it?
If I were you, I'd probably create a custom data type to display the information, (and edit if necessary); it sounds like you'll be creating the data using the shopping cart experience so you probably don't want anyone editing it after the fact?
Hi Robert
There is no UI (user experience) for the end-user, for them to edit or even 'present/see' this information.
Its more to do with checking the subscription duration per the category they subscribed to, so this check will be on back-end razor while the content is being accessed;
I really need something simple, like a list format (subscriptionCategory, Duration, StartDate), to retrieve and check this data. Easy to use with Razor sorta thing.
What would you suggest, without going to custom data type route?
If you don't want to create your own DataType and the list is relatively short - given you have only 3 fields then NestedContent is probably going to fit your requirements.
When it comes to generating NestedContent values programmatically, take a look at this:
https://gist.github.com/robertjf/c6d9122d90b4406b19ec
Thanks for pointing out the NestedContent, not sure why I didnt notice this before.
There is some serious code in the git you posted : )
I have created a simple nested datatype, assigned to a memberType.
Within the code how should I go about casting it properly as member.getvalue is not like a model;
What would be the right approach to get (and also set) to the member nested-dataype in this case?
equivalent of this for the members, more like:
Sorry Robert, wasnt using the new member service...
For anyone in the midst of jumping to the new API, I'm answering my own question above;
One should use the new Member API to get proper IpublishedDocument
instead of using the old member api, using new api;
This will fetch the stored values from member -> nestedContent property.
I'm not sure how to go about "simply" writing to the property though..., the linked code above is a bit over my head.
is working on a reply...