<?php
/**
 * Avalanche for Magento 1.8+
 * Designed by Fast Division (http://fastdivision.com)
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the EULA
 * that is bundled with this package in the file license.txt.
 * It is also available through the world-wide-web at this URL:
 * http://fastdivision.com/legal/license.txt
 *
 * @author     Fast Division
 * @version    1.5.0
 * @copyright  Copyright 2013 Fast Division
 * @license    http://fastdivision.com/legal/license.txt
 */
?>
<?php
    $_item = $this->getItem();
    $canApplyMsrp = Mage::helper('catalog')->canApplyMsrp($_item->getProduct(), Mage_Catalog_Model_Product_Attribute_Source_Msrp_Type::TYPE_BEFORE_ORDER_CONFIRM);
?>
<div class="multishipping-item-photo">
    <a href="<?php echo $this->getProductUrl() ?>" class="product-image" title="<?php echo $this->escapeHtml($this->getProductName()) ?>"><img src="<?php echo $this->getProductThumbnail()->resize(50); ?>" width="50" height="50" alt="<?php echo $this->escapeHtml($this->getProductName()) ?>" /></a>
</div>
<?php if ($this->hasProductUrl()):?>
    <a href="<?php echo $this->getProductUrl() ?>"><?php echo $this->escapeHtml($this->getProductName()) ?></a>
<?php else: ?>
    <?php echo $this->escapeHtml($this->getProductName()) ?>
<?php endif; ?>
<div class="item-detail">
    <?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;?>
    <!-- downloadable -->
    <?php if ($links = $this->getLinks()): ?>
    <dl class="item-options">
        <dt><?php echo $this->getLinksTitle() ?></dt>
        <?php foreach ($links as $link): ?>
            <dd><?php echo $this->escapeHtml($link->getTitle()); ?></dd>
        <?php endforeach; ?>
    </dl>
    <?php endif; ?>
    <!-- EOF downloadable -->

    <?php if ($messages = $this->getMessages()): ?>
    <?php foreach ($messages as $message): ?>
    <div class="shopping-cart-item-message <?php echo $message['type'] ?>">
        * <?php echo $this->escapeHtml($message['text']) ?>
    </div>
    <?php endforeach; ?>
    <?php endif; ?>
</div>