0

My question is an exact duplicate of Remove item-options price from checkout cart except I don't quite understand the accepted answer. I assume I'd have to create a custom template file for this to work? This wouldn't be a problem if I understood what to include in that template file ... i.e. how I would display the custom option label but not value. If my assumption is not right please correct me.

Is there an alternative way? Maybe overriding a class/method?

1

The custom options are displayed in the default template with the following snippet:

<?php if ($_options = $this->getOptionList()):?>
<dl class="item-options">
    <?php foreach ($_options as $_option) : ?>
    <?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?>
    <dt><?php echo $this->escapeHtml($_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->escapeHtml($_option['label']) ?></dt>
                <dd><?php echo $_formatedOptionValue['full_view'] ?></dd>
            </dl>
        </div>
        <?php endif; ?>
    </dd>
    <?php endforeach; ?>
</dl>
<?php endif;?>

So for the needs you have described you could strip this back to simply show the label.

<?php if ($_options = $this->getOptionList()):?>
<dl class="item-options">
    <?php foreach ($_options as $_option) : ?>
    <dt><?php echo $this->escapeHtml($_option['label']) ?></dt>
    </dd>
    <?php endforeach; ?>
</dl>
<?php endif;?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.