adding fields in the shopping cart checkout table as well as to store in OrderProductVariant table in DB

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 years ago
help me experts:

I want to customize by adding two fields in the shopping cart checkout table as below (bold):

Remove  |   Product(s)      |       SSRS    |   CostCenter      |      Price   |   Qty.   |     Total


i want to record these two bold fields also in the DB in table OrderProductVariant table. Please help me in this regard that what entity classes i would need to edit for these two and also at the presentation level what i would need to do.
11 years ago
Add fields to

Core.Domain.Orders.ShoppingCartItem
Core.Domain.Orders.OrderProductVariant
Web.Models.ShoppingCart.ShoppingCartModel.ShoppingCartItemModel  (inside ShoppingCartModel.cs)
Web.Models.Order.OrderDetailsModel.OrderProductVariantModel  (inside OrderDetailsModel.cs)

Update the Controllers to populate the fields and save them

Web.Controllers.ShoppingCartController -> PrepareShoppingCartModel and UpdateCart
Web.Controllers.OrderController -> PrepareOrderDetailsModel

Update the OrderProcessingService to include your new fields when it creates the OrderProductVariants

Services.Orders.OrderProcessingService -> PlaceOrder

Put the new fields in your shopping cart view

Web.Views.ShoppingCart.OrderSummary.cshtml

Optional, add fields to the models in the Admin project:

Admin.Models.Orders.OrderModel.OrderProductVariantModel   (inside OrderModel.cs)
Admin.Models.ShoppingCart.ShoppingCartItemModel

Update those Controllers and Views to display the info



There might be a few other places to change (like the PDF creation) but that should get you started
11 years ago
Another location you may need to add is in the Export/Import section for those fields.  Most of what Andy laid out is what is needed to add a new field.  Also fix UnitTests possibly is on the agenda if you intend on testing things out first (not necessary but useful to a degree).
11 years ago
Another location you may need to add is in the Export/Import section for those fields.  Most of what Andy laid out is what is needed to add a new field.  Also fix UnitTests possibly is on the agenda if you intend on testing things out first (not necessary but useful to a degree).
11 years ago
Thanks AndyMcKenna,

your response is highly appreciated and that's exactly what the way i am customizing the solution by enhancing ordering details from a customer.

Problem Explained:
chajo10, perhaps you couldn't get my idea. I need these two fields SSRS and CostCenterID for each item the user will have in the cart like QUANTITY. Also these two fields may be different for each item in the cart.

This scenario is evolved specially if your customer is an enterprise and using SAP for material purchases and they have different cost center ids or different ssrs numbers issued for each item respectively. Therefore, we have to customize in a way that we can store these values for each corresponding item respectively in orderproductvariant table.

Objective: The customer should know from orders history in future that which particular item of the order has what ssrs and cc and remarks field (purchased for which person in the enterprise).

hope, this explains the objective of the problem...
11 years ago
Sorry, I was thinking more about the Admin side for reports and so on.  My apologies.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.