i think it would make sence to hide the bundle-item in the cart views.
for example: you have a product bundle where the user could config the bundle components (products) himself, i dont want to see the price of the bundle, because the price gets callculated from the components and the bundle itself will be at € 0.

i think it could also make sence to hide all other items from the view expect the bundle-item.
for example: your products dont have there own price because the user could only buy them in combination with other products (as a bundle). so only the product bundle will get a price.

and sometimes maybe it only would be nice to hide only the prices from the "product attributes" field, but i will not think on an example this time.

Members fund testing for the Drupal project. Drupal Association Learn more


olafkarsten’s picture

+1 for the feature

bendev’s picture

This comes from line 53 from .module file

I am looking what's the correct way to alter it.

function commerce_product_attributes_attribute_field(&$element, &$line_item) {

if ($line_item->type != 'product') {

// Add displayed attributes on product page also in shopping cart:
$line_item_wrapper = entity_metadata_wrapper('commerce_line_item', $line_item);
$product = $line_item_wrapper->commerce_product->value();
$product->bundle = 'product';

field_attach_prepare_view('commerce_product', array($product->product_id => $product), 'attribute_view');
$output = field_attach_view('commerce_product', $product, 'attribute_view');
$element['attributes'][] = array(
'#markup' => '

' . drupal_render($output) . '


bendev’s picture

Status: Active » Needs review
1.87 KB

Here is a patch

mikewink’s picture

Version: 7.x-1.0-beta3 » 7.x-1.x-dev

Tested the patch provided in comment #3 with the latest dev version (2011-Sep-19) and it works for me.