I'm looking for a way to remove the value of an item-option from the checkout cart, just removing the text as highlighted below:
I believe this is located in the file app/design/frontend/base/default/template/checkout/cart/item/default.phtml as "item-option"
<?php if ($_options = $this->getOptionList()):?>
<dl class="item-options">
<?php foreach ($_options as $_option) : ?>
<?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?>
<dt><?php echo $this->htmlEscape($_option['label']) ?></dt>
<dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated"<?php endif; ?>><?php echo $_formatedOptionValue['value'] ?>
<?php if (isset($_formatedOptionValue['full_view'])): ?>
<div class="truncated_full_value">
<dl class="item-options">
<dt><?php echo $this->htmlEscape($_option['label']) ?></dt>
<dd><?php echo $_formatedOptionValue['full_view'] ?></dd>
</dl>
</div>
<?php endif; ?>
</dd>
<?php endforeach; ?>
</dl>
<?php endif;?>
Best Answer
It appears as though OP has solved this issue:
There are a buffet of options here. This can be accomplished without a class rewrite by using a custom renderer class or renderer template. The
Mage_Checkout_Block_Cart_Abstract
sets the default renderer:Additional renderers are specified in
checkout.xml
:It is possible to override these templates & specifications using similar directives in custom layout XML:
The
Mage_Catalog_Helper_Product_Configuration::getFormattedOptionValue()
method is ultimately responsible for building the array which is parsed for the display - it's possible to rewrite that class method, but it would be necessary to ensure no knock-on effects exist with other types.