Umbraco.Commerce.Issues
Umbraco.Commerce.Issues copied to clipboard
Allow Umbraco Data Types as Order Property Editors
Is your feature request related to a problem? Please describe. It would be great if we could use existing Data Types as property editors on Order Properties.
Whilst this is kind of possible at the moment, it's tricker than it needs to be because the implementer must:
(A) go digging through the Umbraco code base to find the appropriate view
to use, and
(B) structure the config
in the way expected by the corresponding editor
For example; one of our clients needs the ability to customize confirmation emails using 'canned messages' depending on the fulfilment requirements. We store the canned messages as content nodes in Umbraco and the most appropriate one is 'picked' from the order edit screen. I did manage to get this working the MNTP, but it was a bit fiddly and I had to basically copy the config from the umbracoDataType table.
{
alias: "instructionsTemplate",
label: "Instructions",
isReadOnly: false,
view: 'contentpicker',
config: {
"startNode": {
"type": "content",
"query": "$root/settings/storeSettingsFolder/storeSettings[@nodeName=\"Transfers\"]/transferEmailTemplateRepository"
},
"filter": "transferEmailTemplate",
"minNumber": 0,
"maxNumber":0,
"showOpenButton":false,
"ignoreUserStartNodes":false
}
}
Describe the solution you'd like It would be great if we could just re-use an existing Data Type by supplying it's name or nodeId, something like this:
{
alias: "instructionsTemplate",
label: "Instructions",
isReadOnly: false,
datatype: '[MNTP] Canned Response Picker' OR '6060'
}
Describe alternatives you've considered As mentioned it is possible at the moment, so it's not a massive issue, but it does require a bit of digging and trial & error.