SHARE
TWEET

Untitled

a guest Apr 2nd, 2013 38 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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) 2012 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. <?php
  29. $_product    = $this->getProduct();
  30. $_attributes = Mage::helper('core')->decorateArray($this->getAllowAttributes());
  31. ?>
  32. <?php if ($_product->isSaleable() && count($_attributes)):?>
  33.     <dl>
  34.     <?php foreach($_attributes as $_attribute): ?>
  35.         <dt><label class="required"><em>*</em><?php echo $_attribute->getLabel() ?></label></dt>
  36.         <dd<?php if ($_attribute->decoratedIsLast){?> class="last"<?php }?>>
  37.         <?php if ($_attribute->getLabel() == "Other size") { ?>
  38.             <div class="input-box">
  39.                 <input name="super_attribute[<?php echo $_attribute->getAttributeId() ?>]" id="attribute<?php echo $_attribute->getAttributeId() ?>" type="hidden" value="" />
  40.                 <?php-
  41.                 $attribute = $_product->getResource()->getAttribute('size'); //load the configurable attribute here which is the color
  42.                 $frontend = $attribute->getFrontend();
  43.                 $selectOptions = $frontend->getSelectOptions();               //get the frontend labels and values of this attribute
  44.                     foreach($selectOptions as $color_prop)
  45.                 ?>
  46.             <img onClick="document.getElementById('attribute<?php echo $_attribute->getAttributeId() ?>').value = this.id;" id="<?php echo $color_prop['value'] ?>" src="<?php echo Mage::helper('attributeoptionimage')->getAttributeOptionImage($color_prop['value']) ?>" width="30" height="30">
  47.                
  48.             </div>                                                                                                                                                                                                                    
  49.         <?php } else { ?>  
  50.  
  51.             <div class="input-box">
  52.                 <select name="super_attribute[<?php echo $_attribute->getAttributeId() ?>]" id="attribute<?php echo $_attribute->getAttributeId() ?>" class="required-entry super-attribute-select">
  53.                     <option><?php echo $this->__('Choose an Option...') ?></option>
  54.                   </select>
  55.               </div>
  56.         <?php } ?>  
  57.         </dd>
  58.     <?php endforeach; ?>
  59.     </dl>
  60.     <script type="text/javascript">
  61.         var spConfig = new Product.Config(<?php echo $this->getJsonConfig() ?>);
  62.     </script>
  63. <?php endif;?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top