Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • Justin 19 posts 163 karma points
    Apr 14, 2015 @ 05:27
    Justin
    0

    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.

  • Morten Skjoldager 440 posts 1499 karma points
    Apr 14, 2015 @ 13:13
    Morten Skjoldager
    101

    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

     

  • Justin 19 posts 163 karma points
    Apr 15, 2015 @ 01:19
    Justin
    0

    Thanks morten,

    that really helped!! :)

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Apr 16, 2015 @ 16:17
    Richard Soeteman
    1

    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

Please Sign in or register to post replies

Write your reply to:

Draft