Advertisement
vikasrao999

grouped products displaying in more than once

Apr 8th, 2014
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.06 KB | None | 0 0
  1.  
  2.  
  3. <?php $this->setPreconfiguredValue(); ?>
  4. <?php $_product = $this->getProduct(); ?>
  5.  
  6.  
  7. <?php $_associatedProducts = $this->getAssociatedProducts(); ?>
  8. <?php $_hasAssociatedProducts = count($_associatedProducts) > 0; ?>
  9.  
  10. <?php if ($this->displayProductStockStatus()): ?>
  11. <?php if ($_product->isAvailable() && $_hasAssociatedProducts): ?>
  12. <p class="availability in-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('In stock') ?></span></p>
  13. <?php else: ?>
  14. <p class="availability out-of-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('Out of stock') ?></span></p>
  15. <?php endif; ?>
  16. <?php endif; ?>
  17. <?php echo $this->getChildHtml('product_type_data_extra') ?>
  18.  
  19. <table class="data-table grouped-items-table" id="super-product-table">
  20. <col width="5%" />
  21. <col width="5%" />
  22. <col width="60%" />
  23.  
  24. <col width="5%" />
  25. <col width="5%" />
  26. <col width="5%" />
  27. <col width="5%" />
  28. <col width="5%" />
  29.  
  30.  
  31. <col width="5%" />
  32. <col width="5%" />
  33. <thead>
  34. <tr>
  35.  
  36. <th><?php echo $this->__('Product Name') ?></th>
  37. <th><?php echo $this->__('CUTTER') ?></th>
  38. <th><?php echo $this->__('DIAMETER') ?></th>
  39. <th><?php echo $this->__('CUTTING') ?></th>
  40. <th><?php echo $this->__('LENGTH') ?></th>
  41. <th><?php echo $this->__('LENGTH') ?></th>
  42.  
  43. <?php if ($this->getCanShowProductPrice($_product)): ?>
  44. <th class="a-right"><?php echo $this->__('Price') ?></th>
  45. <?php endif; ?>
  46. <?php if ($_product->isSaleable()): ?>
  47. <th class="a-center"><?php echo $this->__('Qty') ?></th>
  48. <?php endif; ?>
  49. </tr>
  50. </thead>
  51. <tbody>
  52.  
  53.  
  54. <tr>
  55.  
  56.  
  57.  
  58. <?php if ($_hasAssociatedProducts): ?>
  59. <?php foreach ($_associatedProducts as $_item): ?>
  60. <?php $_finalPriceInclTax = $this->helper('tax')->getPrice($_item, $_item->getFinalPrice(), true) ?>
  61.  
  62. <td>3.2M4</td>
  63. <td>3.2mm</td>
  64. <td>1/8"</td>
  65. <td>8mm</td>
  66. <td>5/16"</td>
  67. <td><button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_item) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button></td>
  68.  
  69.  
  70.  
  71. <?php if ($this->getCanShowProductPrice($_product)): ?>
  72. <td class="a-right">
  73. <?php if ($this->getCanShowProductPrice($_item)): ?>
  74. <?php echo $this->getPriceHtml($_item, true) ?>
  75. <?php echo $this->getTierPriceHtml($_item) ?>
  76. <?php endif; ?>
  77. </td>
  78. <?php endif; ?>
  79. <?php if ($_product->isSaleable()): ?>
  80. <td class="a-center">
  81. <?php if ($_item->isSaleable()) : ?>
  82. <input type="text" name="super_group[<?php echo $_item->getId() ?>]" maxlength="12" value="<?php echo $_item->getQty()*1 ?>" title="<?php echo
  83. $this->__('Qty') ?>" class="input-text qty" />
  84. <?php else: ?>
  85. <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
  86. <?php endif; ?>
  87. </td>
  88. <?php endif; ?>
  89. </tr>
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98. <?php endforeach; ?>
  99. <?php else: ?>
  100. <tr>
  101. <td colspan="<?php if ($_product->isSaleable()): ?>4<?php else : ?>3<?php endif; ?>"><?php echo $this->__('No options of this product are available.') ?></td>
  102. </tr>
  103. <?php endif; ?>
  104. </tbody>
  105. </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement