Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > How to Modify Shopping Cart Price to Accept Dynamic Product Pricing View modes: 
User avatar
Member
Member
vivie.chia-mitrais - 1/20/2011 11:50:43 PM
   
How to Modify Shopping Cart Price to Accept Dynamic Product Pricing
Basically my application is using dynamic pricing for product. The pricing will be changed based on the quantity.
e.g:
Quantity: 1-1000 --> Price: $100
Quantity: 1001-2000 --> Price: $95
Quantity: 2001-3000 --> Price: $80

I can't insert the SKUPrice field on Product, since the pricing is dynamic.
My goal is when user fills the quantity and click "Add to Cart" button, the system will acknowledge the quantity and select the correct price. Shopping Cart page needs to show the custom price then, and process it until user creates an Order.

Does anyone know how to achieve this?
Or Kentico support can you help me to achieve this?


Thanks.
Vivie

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 1/25/2011 12:58:03 PM
   
RE:How to Modify Shopping Cart Price to Accept Dynamic Product Pricing
Hello,

I would recommend you to modify the shopping cart in the EvaluateShoppingCartContent method in the file CustomShoppingCartInfoProvider.cs. You will have to add the custom E-commerce provider project to your website as described in our documentation. You can alter before or after our internal method is called the whole shopping cart according to your needs. The shopping cart is a simple datatable with the content of the order. So you can access it the following way:

System.Data.DataTable dt = ((CMS.Ecommerce.ShoppingCartInfo)shoppingCart).ShoppingCartContentTable;


For more information about the methods used please check our API.

Best regards,
Boris Pocatko