Adding parameters to the ShoppingCarItemModel using a plugin

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 лет назад
I need to add a few features to the ShoppingCartItem in my new plugin.

I have tried using the partial class like this

public partial class ShoppingCartItemModel : BaseNopEntityModel
{
    public string ExpectedPrice{ get; set; }
    public string BulkQuantity{ get; set; }
}


I am not sure why this is not giving me the expected result..
Any help in fixing this is highly appreciated...

thank  you.
7 лет назад
[email protected] wrote:
I need to add a few features to the ShoppingCartItem in my new plugin.

I have tried using the partial class like this

public partial class ShoppingCartItemModel : BaseNopEntityModel
{
    public string ExpectedPrice{ get; set; }
    public string BulkQuantity{ get; set; }
}


I am not sure why this is not giving me the expected result..
Any help in fixing this is highly appreciated...

thank  you.


Hi,

If your partial class is in your plugin, then it won't work because partial classes must be defined in the same assembly:

https://msdn.microsoft.com/en-us/library/wa80x488.aspx

*** All partial-type definitions meant to be parts of the same type must be defined in the same assembly and the same module (.exe or .dll file). Partial definitions cannot span multiple modules. ***

Regards,
Hristian
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.