sorry to create a new post. i had originally marked the last post as solved
(https://our.umbraco.org/projects/website-utilities/ucommerce/ucommerce-support/63916-Digital-Product-Downloads)
but realised i had jumped the gun a bit. I did edit my last post thinking it would remove the 'solved' status but it is still showing as solved (and i don't know how to remove it). Hence this new post.
I am struggling to implement a working solution which will allow people to purchase and download digital products. In the last post, martin suggested the following:
'If I were going to implement the data type for your solution I guess I would go for a picker which could point out files in media section and let Umbraco handle the upload functionality.'
I was wondering if anybody may be able to give me some pointers on this as i'm quite new to umbraco and haven't worked with webforms / webcontrols before (it looks like umbraco uses webontrols for custom data types).
Actually this is already available out of the box (more or less). So the ability to configure your digital assets in the backend is already possible.
Here's how to configure it:
In the media section of Umbraco you can create a new type, lets just call it: digital asset. Every media peice you create can have a file associated with it. So here you just want to upload your digital product. When you've done that, you should now have a single media item in Umbraco with an associated file.
Next is the configuration in uCommerce. You need to have a field on your definition, with datatype image (the reason for selecting that data type, is that you select from the media library of Umbraco). You should then be able to select the media content with your file associated. If you're new to definitions in uCommerce, you may be interested in the following article from our docs site: http://docs.ucommerce.net/ucommerce/v6.6/getting-started/definitions.html
Now you have the ability to link media types to your products.
The value saved in uCommerce is the media id for the item you have selected.
The value can be retrieved like so:
using UCommerce.Runtime
using UCommerce.Extensions
int mediaId = UCommerce.Runtime.SiteContext.Current.CatalogContext.CurrentProduct.DynamicProperty<int>().YourDefinitionFieldName;
One remark, a media item can be downloaded directly when someone knows the url. You might want to use a tool like Media protect to protect the media item so only logged in/assigned members can download the item. It comes with an API to so really easy to integrate with a commerce solution.
Digital Download Products (Again)
hi guys,
sorry to create a new post. i had originally marked the last post as solved (https://our.umbraco.org/projects/website-utilities/ucommerce/ucommerce-support/63916-Digital-Product-Downloads)
but realised i had jumped the gun a bit. I did edit my last post thinking it would remove the 'solved' status but it is still showing as solved (and i don't know how to remove it). Hence this new post.
I am struggling to implement a working solution which will allow people to purchase and download digital products. In the last post, martin suggested the following:
'If I were going to implement the data type for your solution I guess I would go for a picker which could point out files in media section and let Umbraco handle the upload functionality.'
I was wondering if anybody may be able to give me some pointers on this as i'm quite new to umbraco and haven't worked with webforms / webcontrols before (it looks like umbraco uses webontrols for custom data types).
I am using umbraco 7.2 with latest uCommerce.
thanks again and sorry for the re-post.
Hey Justin,
Actually this is already available out of the box (more or less). So the ability to configure your digital assets in the backend is already possible.
Here's how to configure it:
In the media section of Umbraco you can create a new type, lets just call it: digital asset. Every media peice you create can have a file associated with it. So here you just want to upload your digital product. When you've done that, you should now have a single media item in Umbraco with an associated file.
Next is the configuration in uCommerce. You need to have a field on your definition, with datatype image (the reason for selecting that data type, is that you select from the media library of Umbraco). You should then be able to select the media content with your file associated. If you're new to definitions in uCommerce, you may be interested in the following article from our docs site: http://docs.ucommerce.net/ucommerce/v6.6/getting-started/definitions.html
Now you have the ability to link media types to your products.
The value saved in uCommerce is the media id for the item you have selected.
The value can be retrieved like so:
using UCommerce.Runtime
using UCommerce.Extensions
int mediaId = UCommerce.Runtime.SiteContext.Current.CatalogContext.CurrentProduct.DynamicProperty<int>().YourDefinitionFieldName;
Hope this helps you in the right direction.
Best regards
Morten
Thanks morten,
that really helped!! :)
Hi Justin,
One remark, a media item can be downloaded directly when someone knows the url. You might want to use a tool like Media protect to protect the media item so only logged in/assigned members can download the item. It comes with an API to so really easy to integrate with a commerce solution.
Best,
Richard
is working on a reply...