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.

  • Filip Lundby 128 posts 149 karma points
    Oct 29, 2014 @ 10:59
    Filip Lundby
    0

    Creating a simple award - not able to save my choise

    I've followed this guide, Add an award, and this, Save custom data in the database. I've created a table uCommerce_PointsAward, added tags to Custom.config and added a row to uCommerce_EntityUi which points at my usercontrol.

    The award shows up in backend and I'm able to added it, but when I click save it disappears - see this video: http://screencast.com/t/U4wswe7I1VK

    I'm not getting any errors - not even in the browser console.

    Here is my code:

    namespace PointsAward
    {
        public class PointsAward : Award
        {
            public virtual int PointsAwardId { get; protected set; }
    
            public override void Apply(PurchaseOrder order, IList<OrderLine> orderLines)
            {
                // Do stuff
            }
        }
    }

     

    namespace PointsAward
    {
        public class PointsUi : ViewEnabledControl<IEditCampaignItemView>, IConfigurable 
        {
            public object New()
            {
                var pointsAward = new PointsAward();
                pointsAward.CampaignItem = View.CampaignItem;
                pointsAward.Save();
    
                DataSource = pointsAward;
                return DataSource;
            }
            public object DataSource { get; set; }
        }
    }
    

     

    namespace PointsAward
    {
        class PointsAwardMappingTag : IContainsNHibernateMappingsTag
        { }
    }

     

    namespace PointsAward
    {
        class PointsAwardMap : BaseClassMap<PointsAward>
        {
            public PointsAwardMap()
            {
                Table("uCommerce_PointsAward");
                Id(x => x.PointsAwardId);
                Map(x => x.PointsAwardId).ReadOnly();
            }
        }
    }
    

     

     

     

     

  • Morten Skjoldager 440 posts 1499 karma points
    Oct 31, 2014 @ 09:43
    Morten Skjoldager
    0

    I notice that both the PointsAwardMappingTag and PointsAwardMap are not public. What happens if you change that for starters :) ? 

Please Sign in or register to post replies

Write your reply to:

Draft