Advertisement
zigojacko

Fix for Iceberg Bundled Options extension

Sep 5th, 2014
517
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.01 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Magento
  4.  *
  5.  * NOTICE OF LICENSE
  6.  *
  7.  * This source file is subject to the Academic Free License (AFL 3.0)
  8.  * that is bundled with this package in the file LICENSE_AFL.txt.
  9.  * It is also available through the world-wide-web at this URL:
  10.  * http://opensource.org/licenses/afl-3.0.php
  11.  * If you did not receive a copy of the license and are unable to
  12.  * obtain it through the world-wide-web, please send an email
  13.  * to license@magentocommerce.com so we can send you a copy immediately.
  14.  *
  15.  * DISCLAIMER
  16.  *
  17.  * Do not edit or add to this file if you wish to upgrade Magento to newer
  18.  * versions in the future. If you wish to customize Magento for your
  19.  * needs please refer to http://www.magentocommerce.com for more information.
  20.  *
  21.  * @category    design
  22.  * @package     base_default
  23.  * @copyright   Copyright (c) 2014 Magento Inc. (http://www.magentocommerce.com)
  24.  * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  25.  */
  26.  
  27. ?>
  28.  
  29. <?php /* @var $this Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option_Radio */ ?>
  30. <?php $_option = $this->getOption(); ?>
  31. <?php $_selections  = $_option->getSelections(); ?>
  32. <?php $_default     = $_option->getDefaultSelection(); ?>
  33. <?php list($_defaultQty, $_canChangeQty) = $this->_getDefaultValues(); ?>
  34. <?php $tierPriceHtml = ''; ?>
  35.  
  36. <dt>
  37.     <label<?php if ($_option->getRequired()) echo ' class="required"' ?>><?php echo $this->escapeHtml($_option->getTitle()) ?><?php if ($_option->getRequired()) echo '<em>*</em>' ?></label>
  38. </dt>
  39. <dd<?php if ($_option->decoratedIsLast){?> class="last"<?php }?>>
  40.     <div class="input-box">
  41.         <?php /** @var $_selection Mage_Catalog_Model_Product*/ ?>
  42.         <?php if ($this->_showSingle()): ?>
  43.             <?php echo $this->getSelectionTitlePrice($_selections[0]); ?>
  44.             <?php if ($_selections[0]->getSelectionCanChangeQty()): ?>
  45.                 <?php $tierPriceHtml = $this->getTierPriceHtml($_selections[0]); ?>
  46.         <?php endif; ?>
  47.         <input type="hidden" name="bundle_option[<?php echo $_option->getId() ?>]" value="<?php echo $_selections[0]->getSelectionId() ?>" />
  48.     <?php else:?>
  49.         <ul class="options-list">
  50.         <?php if (!$_option->getRequired()): ?>
  51.             <li><input type="radio" onclick="bundle.changeSelection(this)" class="radio" id="bundle-option-<?php echo $_option->getId() ?>" name="bundle_option[<?php echo $_option->getId() ?>]"<?php echo ($_default && $_default->isSalable())?'':' checked="checked" ' ?> value=""/>
  52.             <span class="label"><label for="bundle-option-<?php echo $_option->getId() ?>"><?php echo $this->__('None') ?></label></span>
  53.             </li>
  54.         <?php endif; ?>
  55.         <?php foreach ($_selections as $_selection): ?>
  56.             <?php if ($_selection->getSelectionCanChangeQty() && $this->_isSelected($_selection)): ?>
  57.                 <?php $tierPriceHtml = $this->getTierPriceHtml($_selection); ?>
  58.             <?php endif; ?>
  59.             <li><input type="radio" onclick="bundle.changeSelection(this)" class="radio<?php echo $_option->getRequired()?' validate-one-required-by-name':'' ?> change-container-classname" id="bundle-option-<?php echo $_option->getId() ?>-<?php echo $_selection->getSelectionId() ?>" name="bundle_option[<?php echo $_option->getId() ?>]"<?php if ($this->_isSelected($_selection)) echo ' checked="checked"' ?><?php if (!$_selection->isSaleable()) echo ' disabled="disabled"' ?>value="<?php echo $_selection->getSelectionId() ?>"/>
  60.             <span class="label">
  61.                 <label for="bundle-option-<?php echo $_option->getId() ?>-<?php echo $_selection->getSelectionId() ?>"><?php echo $this->getSelectionTitlePrice($_selection) ?></label>
  62.                 <span class="details">(<a target="_blank" rel="iblightbox" modal="width=520;height=200" href="<?php echo $this->getUrl('')?>catalog/productpopup/popup/id/<?php echo $_selection->getProductId()?>">details</a>)</span>
  63.             </span>
  64.             <?php if ($_option->getRequired()): ?>
  65.                 <?php echo $this->setValidationContainer('bundle-option-'.$_option->getId().'-'.$_selection->getSelectionId(), 'bundle-option-'.$_option->getId().'-container') ?>
  66.             <?php endif; ?>
  67.             </li>
  68.         <?php endforeach; ?>
  69.         </ul>
  70.         <div id="bundle-option-<?php echo $_option->getId() ?>-container"></div>
  71.     <?php endif; ?>
  72.     </div>
  73.     <span id="bundle-option-<?php echo $_option->getId() ?>-tier-prices"> <?php echo $tierPriceHtml; ?></span>
  74.     <span class="qty-holder">
  75.         <label for="bundle-option-<?php echo $_option->getId() ?>-qty-input"><?php echo $this->__('Qty:') ?>&nbsp;</label><input onkeyup="bundle.changeOptionQty(this, event)" onblur="bundle.changeOptionQty(this, event)" <?php if (!$_canChangeQty) echo ' disabled="disabled"' ?> id="bundle-option-<?php echo $_option->getId() ?>-qty-input" class="input-text qty<?php if (!$_canChangeQty) echo ' qty-disabled' ?>" type="text" name="bundle_option_qty[<?php echo $_option->getId() ?>]" value="<?php echo $_defaultQty ?>"/>
  76.     </span>
  77. </dd>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement