Copied to clipboard

Flag this post as spam?

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


  • Daniel Nutu 9 posts 30 karma points
    Sep 07, 2015 @ 09:02
    Daniel Nutu
    0

    Extending Merchello

    I'd like to extend Merchello to accommodate the ecommerce for the Romanian market with Company information (a customer can have one or more companies associated with his account, similar to customer addresses), like VAT Number, Trade Registry Number, Bank and IBAN aso.

    From what I can tell this is not quite possible in Merchello without creating another plugin because some Merchello classes or methods are internal: e.g.: Entity is public, but SetPropertyValueAndDetectChanges is internal :(. Why?

    If I'm to create another plugin just for one table then I've have to port every aspect of the database creation into my plugin.

    Isn't there another easier way to accomplish this?

    Here's what my table would look like:

    /// <summary>
    /// 
    /// </summary>
    [TableName("merchCustomerCompany")]
    [PrimaryKey("pk", autoIncrement = false)]
    [ExplicitColumns]
    internal class CustomerCompanyDto
    {
        /// <summary>
        /// 
        /// </summary>
        [Column("pk")]
        [PrimaryKeyColumn(AutoIncrement = false)]
        [Constraint(Default = "newid()")]
        public Guid Key { get; set; }
    
        /// <summary>
        /// 
        /// </summary>
        [Column("customerKey")]
        [ForeignKey(typeof(CustomerDto), Name = "FK_merchCustomerCompany_merchCustomer", Column = "pk")]
        public Guid CustomerKey { get; set; }
    
        /// <summary>
        /// 
        /// </summary>
        [Column("label")]
        [NullSetting(NullSetting = NullSettings.Null)]
        public string Label { get; set; }
    
        /// <summary>
        /// 
        /// </summary>
        [Column("vatNumber")]
        [NullSetting(NullSetting = NullSettings.Null)]
        public string VatNumber { get; set; }
    
        /// <summary>
        /// 
        /// </summary>
        [Column("tradeRegistryNumber")]
        [NullSetting(NullSetting = NullSettings.Null)]
        public string TradeRegistryNumber { get; set; }
    
        /// <summary>
        /// 
        /// </summary>
        [Column("bank")]
        [NullSetting(NullSetting = NullSettings.Null)]
        public string Bank { get; set; }
    
        /// <summary>
        /// 
        /// </summary>
        [Column("bankAccount")]
        [NullSetting(NullSetting = NullSettings.Null)]
        public string BankAccount { get; set; }
    }
    

    Regards,

    Daniel

  • Biagio Paruolo 1583 posts 1814 karma points c-trib
    Sep 07, 2015 @ 12:50
    Biagio Paruolo
    0

    Have you think if this information are possible to manage with Umbraco doctype?

  • Daniel Nutu 9 posts 30 karma points
    Sep 08, 2015 @ 10:24
    Daniel Nutu
    0

    This information is per customer and it really needs to be stored in the DB so it can later be stored in the order info / invoice.

Please Sign in or register to post replies

Write your reply to:

Draft