Skip to content

Instantly share code, notes, and snippets.

@amacgregor
Created June 8, 2011 13:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amacgregor/1014438 to your computer and use it in GitHub Desktop.
Save amacgregor/1014438 to your computer and use it in GitHub Desktop.
configurable.phtml
<?php
/**
* Magento Commercial Edition
*
* NOTICE OF LICENSE
*
* This source file is subject to the Magento Commercial Edition License
* that is available at: http://www.magentocommerce.com/license/commercial-edition
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@magentocommerce.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Magento to newer
* versions in the future. If you wish to customize Magento for your
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category design
* @package base_default
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
* @license http://www.magentocommerce.com/license/commercial-edition
*/
?>
<?php
$_product = $this->getProduct();
$_attributes = Mage::helper('core')->decorateArray($this->getAllowAttributes());
?>
<?php if ($_product->isSaleable() && count($_attributes)):?>
<dl>
<?php foreach($_attributes as $_attribute): ?>
<dt><label><?php echo $_attribute->getLabel() ?><span class="required">&nbsp;*</span></label></dt>
<dd<?php if ($_attribute->decoratedIsLast){?> class="last"<?php }?>>
<div name="super_attribute[<?php echo $_attribute->getAttributeId() ?>]" id="attribute<?php echo $_attribute->getAttributeId() ?>" class="required-entry super-attribute-select">
<span style="font-style: italic"><?php echo $this->__('Choose an Option...') ?></span>
</div>
</dd>
<?php endforeach; ?>
</dl>
<script type="text/javascript">
var spConfig = new Product.Config(<?php echo $this->getJsonConfig() ?>);
</script>
<?php endif;?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment