Value is inserting as null in cart line item extension property

Hello Team,

I created a custom module that extends the cart line item to include one additional property. Using migration, I am able to generate the new properties in the cart line item table.

This is the link to the repository - GitHub - shubhamdhanetia/customcartmodule

The issue we are facing right now is not able to add data in the new column even though the value is passed. The value is inserted as NULL.

While debugging in the Virto Cart module, we were able to see the new property with value that we created in the custom module. However, in the shopping service method - SaveChangesAsync, after the commitasync method called, the value is inserting as Null.

We also tried to install virto demo feature module that have a extension property as sample, but there also it is inserting as Null when passing the value via post cart line item API. Is it a bug ?

Platform version: 3.66
Virto Cart version : 3.15

Regards,
Shubham Dhanetia

Hi Shubham.

Please check my commit Fix PrescriptionId · OlegoO/customcartmodule@438f784 (github.com)

I used API to create a new cart with PrescriptionId = ''OZ-Test"

Checked DB

Call get cart by ID

Is it resolve your issue on your machine?

Thank you Oleg.

Yes, it does work now on my machine. I forgot to include the virto cart module dependency in the manifest file of the custom module and it seems like that could be the main reason for the issue.

1 Like