Advertisement
Guest User

view

a guest
May 26th, 2015
318
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.15 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) 2014 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 $pageLayout = str_replace(array('page/','.phtml'),'',Mage::app()->getLayout()->getBlock('root')->getTemplate()); ?>
  36. <?php $_product = $this->getProduct(); ?>
  37. <?php $setting = Mage::helper('em0113settings'); ?>
  38. <script type="text/javascript">
  39. var optionsPrice = new Product.OptionsPrice(<?php echo $this->getJsonConfig() ?>);
  40. </script>
  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.  
  51. <div class="product-img-box" style="width:<?php echo $setting->getImageProduct_BaseImageWidth(390) ?>px;">
  52. <?php echo $this->getChildHtml('media') ?>
  53. </div>
  54. <?php
  55. $related_product_collection = $_product->getRelatedProductCollection();
  56. $related_product_collection->AddStoreFilter();
  57. $count = count($related_product_collection);
  58. ?>
  59. <div class="product-shop <?php if($count > 0 && $pageLayout=='1column'): ?>has-related<?php else: ?>no-related<?php endif ?>">
  60. <div class="product-shop-wrapper <?php if($_product->isGrouped()): ?>grouped<?php endif ?>">
  61. <?php list($_prev_prod, $_next_prod) = Mage::helper('em0113settings/product')->getPreviousNextProducts($this->getProduct()); ?>
  62.  
  63. <?php if($_prev_prod != NULL): ?>
  64. <a href="<?php echo $_prev_prod->getProductUrl(); ?>" title="<?php echo $this->__('Previous') ?>" class="prev"><?php echo $this->__('Previous') ?></a>
  65. <?php endif; ?>
  66.  
  67. <?php if($_next_prod != NULL): ?>
  68. <a href="<?php echo $_next_prod->getProductUrl(); ?>" title="<?php echo $this->__('Next') ?>" class="next"><?php echo $this->__('Next') ?></a>
  69. <?php endif; ?>
  70.  
  71. <div class="product-name">
  72. <h2><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></h2>
  73. </div>
  74. <?php if ($this->canEmailToFriend()): ?>
  75. <p class="email-friend"><a href="<?php echo $this->helper('catalog/product')->getEmailToFriendUrl($_product) ?>"><?php echo $this->__('Email to a Friend') ?></a></p>
  76. <?php endif; ?>
  77.  
  78. <?php echo $this->getReviewsSummaryHtml($_product, false, true)?>
  79.  
  80. <?php if ($this->displayProductStockStatus()): ?>
  81. <?php if($_product->isSaleable()): ?>
  82. <p class="availability in-of-stock"><span><?php echo $this->__('In of stock') ?></span></p>
  83. <?php else : ?>
  84. <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
  85. <?php endif; ?>
  86. <?php endif; ?>
  87.  
  88. <?php if ($_product->getShortDescription()):?>
  89. <div class="short-description">
  90. <h2><?php echo $this->__('Quick Overview') ?></h2>
  91. <div class="std"><?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?></div>
  92. </div>
  93. <?php endif;?>
  94.  
  95. <div class="product-data">
  96. <?php echo $this->getChildHtml('alert_urls') ?>
  97.  
  98. <?php echo $this->getChildHtml('product_type_data') ?>
  99. <?php echo $this->getChildHtml('extrahint') ?>
  100. <?php echo $this->getTierPriceHtml() ?>
  101. </div>
  102.  
  103. <?php if (!$this->hasOptions()):?>
  104. <div class="add-to-box">
  105. <?php if($_product->isSaleable()): ?>
  106. <?php echo $this->getChildHtml('addtocart') ?>
  107. <?php else:?>
  108. <?php echo $this->getChildHtml('addto') ?>
  109. <?php endif; ?>
  110. </div>
  111. <?php echo $this->getChildHtml('extra_buttons') ?>
  112. <?php elseif (!$_product->isSaleable()): ?>
  113. <div class="add-to-box">
  114. <?php echo $this->getChildHtml('addto') ?>
  115. </div>
  116. <?php endif; ?>
  117.  
  118.  
  119. <?php echo $this->getChildHtml('other');?>
  120. <?php echo $this->getChildHtml('short_des_after'); ?>
  121.  
  122. <?php if ($_product->isSaleable() && $this->hasOptions()):?>
  123. <?php echo $this->getChildChildHtml('container1', '', true, true) ?>
  124. <?php endif;?>
  125. <?php echo $this->getChildHtml('shippingreturns') ?>
  126.  
  127. </div>
  128.  
  129. </div>
  130.  
  131. <div class="clearer"></div>
  132. <?php if ($_product->isSaleable() && $this->hasOptions()):?>
  133. <?php echo $this->getChildChildHtml('container2', '', true, true) ?>
  134. <?php endif;?>
  135. </form>
  136. <!-- Add button share facebook -->
  137. <?php if ($setting->getImageProduct_ViewSocial()): ?>
  138. <div id="social-share" class="hide-lte0 hide-lte1 hide-lte2"></div>
  139. <script type="text/javascript">
  140. jQuery(document).ready(function($){
  141. jQuery('#social-share').dcSocialShare({
  142. buttons: 'facebook,plusone,twitter,pinterest',
  143. twitterId: 'designchemical',
  144. email: 'moc//niamod/liame',
  145. align: 'right',
  146. floater: false
  147. });
  148. });
  149. </script>
  150. <?php endif; ?>
  151. <script type="text/javascript">
  152. //<![CDATA[
  153. var productAddToCartForm = new VarienForm('product_addtocart_form');
  154. productAddToCartForm.submit = function(button, url) {
  155. if (this.validator.validate()) {
  156. var form = this.form;
  157. var oldUrl = form.action;
  158.  
  159. if (url) {
  160. form.action = url;
  161. }
  162. var e = null;
  163. try {
  164. this.form.submit();
  165. } catch (e) {
  166. }
  167. this.form.action = oldUrl;
  168. if (e) {
  169. throw e;
  170. }
  171.  
  172. if (button && button != 'undefined') {
  173. button.disabled = true;
  174. }
  175. }
  176. }.bind(productAddToCartForm);
  177.  
  178. productAddToCartForm.submitLight = function(button, url){
  179. if(this.validator) {
  180. var nv = Validation.methods;
  181. delete Validation.methods['required-entry'];
  182. delete Validation.methods['validate-one-required'];
  183. delete Validation.methods['validate-one-required-by-name'];
  184. // Remove custom datetime validators
  185. for (var methodName in Validation.methods) {
  186. if (methodName.match(/^validate-datetime-.*/i)) {
  187. delete Validation.methods[methodName];
  188. }
  189. }
  190.  
  191. if (this.validator.validate()) {
  192. if (url) {
  193. this.form.action = url;
  194. }
  195. this.form.submit();
  196. }
  197. Object.extend(Validation.methods, nv);
  198. }
  199. }.bind(productAddToCartForm);
  200. //]]>
  201. </script>
  202. </div>
  203.  
  204. <?php echo $this->getChildHtml('catalog.product.related'); ?>
  205.  
  206. <div class="product-collateral">
  207. <?php foreach ($this->getChildGroup('detailed_info', 'getChildHtml') as $alias => $html):?>
  208. <div class="box-collateral <?php echo "box-{$alias}"?>">
  209. <?php if ($title = $this->getChildData($alias, 'title')):?>
  210. <h2><?php echo $this->escapeHtml($title); ?></h2>
  211. <?php endif;?>
  212. <?php echo $html; ?>
  213. </div>
  214. <?php endforeach;?>
  215. <?php echo $this->getChildHtml('product_additional_data') ?>
  216. <?php echo $this->getChildHtml('product_additional_collateral') ?>
  217. </div>
  218. <?php echo $this->getChildHtml('review_list') ?>
  219. <?php echo $this->getChildHtml('upsell_products') ?>
  220. <?php if (Mage::helper('em0113settings')->getImageProduct_UseTabs()): ?>
  221. <script type="text/javascript">
  222. //<![CDATA[
  223. jQuery(window).ready(function() {
  224. setTimeout(function() {
  225. timeout = null;
  226. EM.tools.decorateProductCollateralTabs();
  227. }, 200);
  228. });
  229. //]]>
  230. </script>
  231. <?php endif ?>
  232. </div>
  233. <?php $stockItem = $_product->getStockItem(); ?>
  234. <?php if (!$stockItem->getIsInStock()): ?>
  235. <span class="out-of-stock"><span>Sold Out</span></span>
  236. <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement