Advertisement
Guest User

view

a guest
Jun 8th, 2015
499
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.87 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 [email protected] 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) 2013 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. * Product view template
  29. *
  30. * @see Mage_Catalog_Block_Product_View
  31. * @see Mage_Review_Block_Product_View
  32. */
  33. ?>
  34. <?php $_helper = $this->helper('catalog/output'); ?>
  35. <?php $_product = $this->getProduct(); ?>
  36. <script type="text/javascript">
  37. var optionsPrice = new Product.OptionsPrice(<?php echo $this->getJsonConfig() ?>);
  38. </script>
  39. <div class="container">
  40. <div class="row">
  41. <div id="messages_product_view"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?></div>
  42. <div class="product-view">
  43. <div class="product-essential">
  44. <form action="<?php echo $this->getSubmitUrl($_product) ?>" method="post" id="product_addtocart_form"<?php if($_product->getOptions()): ?> enctype="multipart/form-data"<?php endif; ?>>
  45. <?php echo $this->getBlockHtml('formkey') ?>
  46. <div class="no-display">
  47. <input type="hidden" name="product" value="<?php echo $_product->getId() ?>" />
  48. <input type="hidden" name="related_product" id="related-products-field" value="" />
  49. </div>
  50. <div class="col-xs-12 col-sm-5">
  51. <div class="product-img-box">
  52. <?php echo $this->getChildHtml('media'); ?>
  53. <?php echo $this->getChildHtml('related_colors'); ?>
  54. </div>
  55. </div>
  56. <?php
  57. $addDiscountClass = false;
  58. if($_product->getPrice() > $_product->getFinalPrice()) : $addDiscountClass = true; endif;
  59. ?>
  60. <div class="col-xs-12 col-sm-7">
  61. <div class="product-shop <?php if(!$addDiscountClass) : echo 'non-discounted'; endif; ?>">
  62.  
  63. <div class="product-name">
  64. <h1><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></h1>
  65. </div>
  66.  
  67. <?php if ($_product->getShortDescription()):?>
  68. <div class="short-description">
  69. <div class="std"><?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?></div>
  70. <?php $_productCollection=$this->getLoadedProductCollection(); ?>
  71. </div>
  72. <?php endif;?>
  73.  
  74. <?php echo $this->getChildHtml('alert_urls') ?>
  75. <?php echo $this->getTierPriceHtml() ?>
  76. <?php echo $this->getChildHtml('extrahint') ?>
  77.  
  78. <?php if (!$this->hasOptions()):?>
  79. <div class="add-to-box">
  80. <?php if($_product->isSaleable()): ?>
  81. <?php echo $this->getChildHtml('addtocart') ?>
  82. <?php endif; ?>
  83. </div>
  84. <?php echo $this->getChildHtml('extra_buttons') ?>
  85. <?php
  86. elseif (!$_product->isSaleable()): ?>
  87. <?php echo $this->getChildHtml('disabledcart') ?>
  88. <?php endif; ?>
  89.  
  90. <?php echo $this->getChildHtml('other');?>
  91.  
  92. <?php if ($_product->isSaleable() && $this->hasOptions()):?>
  93. <?php echo $this->getChildChildHtml('container1', '', true, true); ?>
  94. <?php endif;?>
  95. <div class="usp">
  96. <div class="delivery">
  97. <div class="usp-icon"><i class="fa fa-truck"></i></div>
  98. <div class="usp-text">
  99. Buy now and get it delivered in 4-5 days
  100. </div>
  101. </div>
  102. <div class="contact">
  103. <div class="usp-icon"><span class="fa fa-phone"></span></div>
  104. <div class="usp-text">
  105. Need help? <br/>
  106. Call <?php echo Mage::getStoreConfig('general/store_information/phone'); ?>
  107. </div>
  108. </div>
  109. </div>
  110.  
  111. <div class="clearfix"></div>
  112. <div class="cod-finder">
  113. <?php echo $this->getChildHtml('cod.checker'); ?>
  114. </div>
  115. <div class="offer-global">
  116. <?php echo $this->getChildHtml('product_global_offer'); ?>
  117. </div>
  118. </div>
  119. </div>
  120. <div class="clearer"></div>
  121. <?php if ($_product->isSaleable() && $this->hasOptions()):?>
  122. <?php echo $this->getChildChildHtml('container2', '', true, true) ?>
  123. <?php endif;?>
  124. </form>
  125. <script type="text/javascript">
  126. //<![CDATA[
  127. var productAddToCartForm = new VarienForm('product_addtocart_form');
  128. productAddToCartForm.submit = function(button, url) {
  129. if (this.validator.validate()) {
  130. var form = this.form;
  131. var oldUrl = form.action;
  132.  
  133. if (url) {
  134. form.action = url;
  135. }
  136. var e = null;
  137. try {
  138. this.form.submit();
  139. } catch (e) {
  140. }
  141. this.form.action = oldUrl;
  142. if (e) {
  143. throw e;
  144. }
  145.  
  146. if (button && button != 'undefined') {
  147. button.disabled = true;
  148. }
  149. }
  150. }.bind(productAddToCartForm);
  151.  
  152. productAddToCartForm.submitLight = function(button, url){
  153. if(this.validator) {
  154. var nv = Validation.methods;
  155. delete Validation.methods['required-entry'];
  156. delete Validation.methods['validate-one-required'];
  157. delete Validation.methods['validate-one-required-by-name'];
  158. // Remove custom datetime validators
  159. for (var methodName in Validation.methods) {
  160. if (methodName.match(/^validate-datetime-.*/i)) {
  161. delete Validation.methods[methodName];
  162. }
  163. }
  164.  
  165. if (this.validator.validate()) {
  166. if (url) {
  167. this.form.action = url;
  168. }
  169. this.form.submit();
  170. }
  171. Object.extend(Validation.methods, nv);
  172. }
  173. }.bind(productAddToCartForm);
  174. //]]>
  175. </script>
  176. </div>
  177. </div>
  178. </div>
  179. </div>
  180.  
  181.  
  182.  
  183. <div class="product-reinforcement">
  184. <div class="container">
  185. <div class="row">
  186. <div class="col-xs-12 col-sm-12">
  187. <img alt="" class="stamp"
  188. src="<?php echo $this->getSkinUrl('images/catalog/product/stamp.png'); ?>"/>
  189. <ul>
  190. <li>100% original</li>
  191. <li>Flat Rs 50 Shipping</li>
  192. <li>Easy exchange</li>
  193. <li>30 day returns</li>
  194. </ul>
  195. </div>
  196. </div>
  197. </div>
  198.  
  199. </div>
  200. <div class="product-collateral">
  201. <div class="container">
  202. <div class="row">
  203. <div class="col-xs-12 col-sm-7 product-attributes">
  204. <div class="panel-group" id="accordion">
  205. <?php foreach ($this->getChildGroup('detailed_info', 'getChildHtml') as $alias => $html):?>
  206. <?php echo $html; ?>
  207. <?php endforeach;?>
  208. </div>
  209. </div>
  210. <div class="col-xs-12 col-sm-4 col-xs-offset-1 product-related">
  211. <?php echo $this->getChildHtml('related'); ?>
  212. </div>
  213. </div>
  214. </div>
  215. <div class="container">
  216. <div class="row">
  217. <div class="col-xs-12 col-sm-12">
  218. <?php echo $this->getChildHtml('upsell_products') ?>
  219. </div>
  220. </div>
  221. </div>
  222. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement