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.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | Commerce_product_attributes-hide_price-1322632-6868602.patch | 1.87 KB | bendev |
| bundle-item.png | 6.59 KB | kitikonti |
Comments
Comment #1
olafkarsten commented+1 for the feature
Comment #2
bendev commentedThis 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') {
return;
}
// 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' => '
',
);
}
Comment #3
bendev commentedHere is a patch
Comment #4
Anonymous (not verified) commentedTested the patch provided in comment #3 with the latest dev version (2011-Sep-19) and it works for me.