Advertisement
vikasrao999

Grouped product

Apr 13th, 2014
540
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.92 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) 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. * Grouped product data template
  29. *
  30. * @see Mage_Catalog_Block_Product_View_Media
  31. * @see Mage_Catalog_Block_Product_View_Type_Grouped
  32. */
  33. ?>
  34. <?php $this->setPreconfiguredValue(); ?>
  35. <?php $_product = $this->getProduct(); ?>
  36. <?php $_associatedProducts = $this->getAssociatedProducts(); ?>
  37. <?php $_hasAssociatedProducts = count($_associatedProducts) > 0; ?>
  38. <?php if ($_product->isAvailable() && $_hasAssociatedProducts): ?>
  39. <p class="availability in-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('In stock') ?></span></p>
  40. <?php else: ?>
  41. <p class="availability out-of-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('Out of stock') ?></span></p>
  42. <?php endif; ?>
  43. <?php echo $this->getChildHtml('product_type_data_extra') ?>
  44.  
  45.  
  46. <div class="Table">
  47.  
  48.  
  49. <div class="Heading">
  50.  
  51.  
  52. <!-- new columns -->
  53. <div class="Cell"><?php echo $this->__('REF.NO.') ?></div>
  54. <div class="Cell"><?php echo $this->__('CUTTER') ?></div>
  55. <div class="Cell"><?php echo $this->__('DIAMETER') ?></div>
  56. <div class="Cell"><?php echo $this->__('CUTTING') ?></div>
  57. <div class="Cell"><?php echo $this->__('LENGTH') ?></div>
  58. <!-- new columns end-->
  59.  
  60. <?php if ($this->getCanShowProductPrice($_product)): ?>
  61. <div class="Cell"><?php echo $this->__('Price') ?></div>
  62. <?php endif; ?>
  63. <?php if ($_product->isSaleable()): ?>
  64. <div class="Cell"><?php echo $this->__('Qty') ?></div>
  65. <?php endif; ?>
  66. <div class="Cell"><?php echo $this->__('BUY') ?></div>
  67.  
  68. </div>
  69.  
  70. <?php if ($_hasAssociatedProducts): ?>
  71. <?php foreach ($_associatedProducts as $_item): ?>
  72. <?php $_finalPriceInclTax = $this->helper('tax')->getPrice($_item, $_item->getFinalPrice(), true) ?>
  73. <div class="Row">
  74.  
  75. <!-- new columns -->
  76. <div class="Cell"><?php echo $this->htmlEscape($_item->getData('refno')) ?></div>
  77. <div class="Cell"><?php echo $this->htmlEscape($_item->getData('cutter')) ?></div>
  78. <div class="Cell"><?php echo $this->htmlEscape($_item->getData('diameter')) ?></div>
  79. <div class="Cell"><?php echo $this->htmlEscape($_item->getData('cutting')) ?></div>
  80. <div class="Cell"><?php echo $this->htmlEscape($_item->getData('length')) ?></div>
  81.  
  82. <!-- new columns end-->
  83. <?php if ($this->getCanShowProductPrice($_product)): ?>
  84. <div class="Cell">
  85. <?php if ($this->getCanShowProductPrice($_item)): ?>
  86. <?php echo $this->getPriceHtml($_item, true) ?>
  87. <?php echo $this->getTierPriceHtml($_item) ?>
  88. <?php endif; ?>
  89. </div>
  90. <?php endif; ?>
  91. <?php if ($_product->isSaleable()): ?>
  92. <div class="Cell">
  93. <?php if ($_item->isSaleable()) : ?>
  94. <input type="hidden" name="super_group[<?php echo $_item->getId() ?>]" maxlength="12" value="1" title="<?php echo $this->__('Qty') ?>" class="input-text qty" />
  95. <?php else: ?>
  96. <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
  97. <?php endif; ?>
  98. </div>
  99. <?php endif; ?>
  100. <div class="Cell"><button type="button" class="form-button" onclick="productAddToCartForm.submit()"><span><?php echo $this->__('BUY') ?></span></button></div>
  101. </div>
  102.  
  103. <?php endforeach; ?>
  104. <?php else: ?>
  105. <tr>
  106. <td colspan="<?php if ($_product->isSaleable()): ?>4<?php else : ?>3<?php endif; ?>"><?php echo $this->__('No options of this product are available.') ?></td>
  107. </tr>
  108. <?php endif; ?>
  109.  
  110. </div>
  111. <p class="d"> Prices are exclusive of GST. </p>
  112. <script type="text/javascript">decorateTable('super-product-table')</script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement