ASPX templates
Version 6.x > ASPX templates > Don't show products if they are bundleItems View modes: 
User avatar
Member
Member
rmshearer83-gmail - 7/18/2013 9:00:31 AM
   
Don't show products if they are bundleItems
how do you list only the bundle product and not the bundleItems in the cart preview?

thanks

Rachel

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 7/20/2013 2:08:16 PM
   
RE:Don't show products if they are bundleItems
Hello Rachel,

there are basically two approaches, how to achieve something like this. One approach would be to modify the checkout process directly. This can be done in the file CMSModules\Ecommerce\Controls\ShoppingCart\ShoppingCartContent.ascx.cs. There is the ReloadData method which assignes the ContentTable of the shopping cart to the dataset of the gridData gridview:
gridData.DataSource = ShoppingCartInfoObj.ContentTable;

The second approach would be to modify the following method:
protected override ShoppingCartInfo  GetShoppingCartInfoInternal(int userId, string siteName)

This can be done with the new customization model from 6.0:

1. [url=devnet.kentico.com/Blogs/Petr-Vozak/October-2011/E-commerce-6-New-customization-model.aspx ]devnet.kentico.com/Blogs/Petr-Vozak/October-2011/E-commerce-6-New-customization-model.aspx [/url]
2. devnet.kentico.com/Blogs/Martin-Hejtmanek/October-2011/Code-customization-in-Kentico-CMS-6.aspx

Best Regards,
Martin Danko