Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Academic Free License (AFL 3.0)
- * that is bundled with this package in the file LICENSE_AFL.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/afl-3.0.php Them - 1
- * 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@magento.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.magento.com for more information.
- *
- * @category design
- * @package rwd_default
- * @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
- * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
- */
- /**
- * Product view template
- *
- * @see Mage_Catalog_Block_Product_View
- * @see Mage_Review_Block_Product_View
- */
- ?>
- <?php $_helper = $this->helper('catalog/output');
- $_product = $this->getProduct();
- ?>
- <script type="text/javascript">
- var optionsPrice = new Product.OptionsPrice(<?php echo $this->getJsonConfig() ?>);
- </script>
- <div id="messages_product_view"><?php echo $this->getMessagesBlock()->toHtml() ?></div>
- <div class="product-view">
- <div class="product-essential" style="padding:10px 10px 10px;">
- <form action="<?php echo $this->getSubmitUrl($_product, array('_secure' => $this->_isSecure())) ?>" method="post" id="product_addtocart_form"<?php if($_product->getOptions()): ?> enctype="multipart/form-data"<?php endif; ?>>
- <?php echo $this->getBlockHtml('formkey') ?>
- <div class="no-display">
- <input type="hidden" name="product" value="<?php echo $_product->getId() ?>" />
- <input type="hidden" name="related_product" id="related-products-field" value="" />
- </div>
- <div class="product-img-box" style="width:40%;">
- <div class="product-name">
- <h1><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></h1>
- </div>
- <a target ="_blank" href="http://pinterest.com/pin/create/button/?url=<?php echo trim(Mage::registry('current_product')->getProductUrl()); ?>&media=<?php echo trim($this->helper('catalog/image')->init($_product, 'image')); ?>&description=<?php echo trim(Mage::registry('current_product')->getName()); ?>" class="pin-it-button" count-layout="horizontal">
- <img src ="<?php echo $this->getSkinUrl('images/pin.png') ?>"/></a>
- <?php echo $this->getChildHtml('media') ?>
- </div>
- <div class="product-shop">
- <div class="product-name">
- <span class="h1">
- <?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></span>
- </div>
- <?php echo $this->getChildHtml('aitcg_js_styles1'); ?>
- <div class="price-info">
- <?php echo $this->getPriceHtml($_product);
- echo $this->getChildHtml('bundle_prices');
- echo $this->getTierPriceHtml(); ?>
- </div>
- <?php $_price = $_product->getPrice();
- $_finalPrice =$_product->getFinalPrice();
- if($_price > $_finalPrice){?>
- <div class="save-me">
- <?php if($_finalPrice < $_price):
- $_savePercent = 100 - round(($_finalPrice / $_price) * 100);
- $_saveAmount = number_format(($_price - $_finalPrice), 2);
- echo $_savePercent; ?>%<br/>
- <span>OFF</span>
- <?php endif; ?>
- </div>
- <?php }?>
- <div class="dinfo">
- <?php echo $attribute_value = $_product->getData('delivery_info');?>
- </div>
- <?php echo $this->getChildHtml('alert_urls');
- echo $this->getChildHtml('other');
- if ($_product->isSaleable() && $this->hasOptions()):
- echo $this->getChildChildHtml('container1', '', true, true);
- endif; ?>
- <?php if($_product->getAttributeText('pre_order')=='yes')
- {
- echo "Pre Order ends in";
- }
- $end_datetime=$_product->getEcomdevExpiryDate();
- $date = date( "Y/m/d H:i:s",strtotime($end_datetime));
- $endstr= date(strtotime($date));
- $nowstr = Mage::getModel('core/date')->timestamp(time());
- $now = date('Y/m/d H:i:s', $nowstr); ?>
- <span id="countdown" class="countdown"></span>
- </div>
- <div class="add-to-cart-wrapper">
- <?php echo $this->getChildHtml('product_type_data') ?>
- <?php echo $this->getChildHtml('extrahint') ?>
- <?php if (!$this->hasOptions()):?>
- <div class="add-to-box">
- <?php if($_product->isSaleable()):
- // echo $this->getChildHtml('addtocart');
- if( $this->helper('wishlist')->isAllow() || $_compareUrl=$this->helper('catalog/product_compare')->getAddUrl($_product)):?>
- <span class="or"><?php echo $this->__('OR') ?></span>
- <?php endif;
- endif; ?>
- </div>
- <?php //echo $this->getChildHtml('extra_buttons');
- elseif (!$_product->isSaleable()): ?>
- <div class="add-to-box">
- <?php //echo $this->getChildHtml('addto');
- echo $this->getChildHtml('sharing') ?>
- </div>
- <?php endif; ?>
- </div>
- <?php echo $this->getChildHtml('related_products') ?>
- <div class="clearer"></div>
- <?php if ($_product->isSaleable() && $this->hasOptions()):
- echo $this->getChildChildHtml('container2', '', true, true);
- endif;?>
- </form>
- <script type="text/javascript">
- var productAddToCartForm = new VarienForm('product_addtocart_form');
- /*
- productAddToCartForm.submit = function(button, url) {
- var form = this.form;
- var oldUrl = form.action;
- if (url) {
- form.action = url;
- }
- var e = null;
- try {
- this.form.submit();
- } catch (e) {
- }
- this.form.action = oldUrl;
- if (e) {
- throw e;
- }
- if (button && button != 'undefined') {
- button.disabled = true;
- }
- }.bind(productAddToCartForm);
- */
- productAddToCartForm.submitLight = function(button, url){
- if(this.validator) {
- var nv = Validation.methods;
- delete Validation.methods['required-entry'];
- delete Validation.methods['validate-one-required'];
- delete Validation.methods['validate-one-required-by-name'];
- for (var methodName in Validation.methods) {
- if (methodName.match(/^validate-datetime-.*/i)) {
- delete Validation.methods[methodName];
- }
- }
- if (this.validator.validate()) {
- if (url) {
- this.form.action = url;
- }
- this.form.submit();
- }
- Object.extend(Validation.methods, nv);
- }
- }.bind(productAddToCartForm);
- //]]>
- </script>
- </div>
- <div class="product-collateral toggle-content">
- <?php if ($detailedInfoGroup = $this->getChildGroup('detailed_info', 'getChildHtml')):?>
- <dl id="collateral-tabs" class="collateral-tabs">
- <?php foreach ($detailedInfoGroup as $alias => $html):?>
- <dt class="tab"><span><?php echo $this->escapeHtml($this->getChildData($alias, 'title')) ?></span></dt>
- <dd class="tab-container">
- <div class="tab-content"><?php echo $html ?></div>
- </dd>
- <?php endforeach;?>
- </dl>
- <?php endif; ?>
- </div>
- <?php echo $this->getChildHtml('upsell_products');
- echo $this->getChildHtml('product_additional_data')
- ?>
- </div>
- <!-- tabs -->
- <div id="tab-container">
- <div class="tabs active" onclick="changeTab(0)"><?php echo $this->__('Product Description');?></div>
- <div class="tabs" onclick="changeTab(1)"><?php echo $this->__('Features');?></div>
- <div class="tabs" onclick="changeTab(2)"><?php echo $this->__('Packaging');?></div>
- <div class="tabs" onclick="changeTab(3)"><?php echo $this->__('Reviews');?></div>
- <div class="tabs" onclick="changeTab(4)"><?php echo $this->__('Add Reviews');?></div>
- <div id="tab-1" class="tab-text active">
- <div class="next-content-product">
- <h3><?php echo $this->__("Product Description of "); ?><span><?php echo $this->getProduct()->getName(); ?></span></h3>
- <?php echo $_product->getDescription();?>
- </div>
- </div>
- <div id="tab-2" class="tab-text">
- <div class="next-level-content-product">
- <div class="size-space">
- <h3><?php echo $this->__("Features of "); ?><span><?php echo $this->getProduct()->getName(); ?></span></h3>
- <?php echo $attribute_value = $_product->getData('size_space');?>
- </div>
- </div>
- </div>
- <div id="tab-5" class="tab-text">
- <div class="interior-exterior">
- <?php echo $attribute_value = $_product->getData('interior_exterior');?>
- </div>
- </div>
- <div id="tab-3" class="tab-text">
- <?php
- $reviewListBlock = $this->getLayout()->createBlock('review/product_view_list');
- echo $reviewListBlock->setTemplate('review/product/view/list.phtml')->toHtml();
- ?>
- </div>
- <div id="tab-4" class="tab-text">
- <?php
- $reviewFormBlock = $this->getLayout()->createBlock('review/form');
- echo $reviewFormBlock->setTemplate('review/form.phtml')->toHtml();
- ?>
- </div>
- <div id="tab-5" class="tab-text">
- <div class="interior-exterior">
- <?php echo $attribute_value = $_product->getData('interior_exterior');?>
- </div>
- </div>
- </div>
- <!-- Tabs end -->
- <script>
- window.changeTab = function(tabNum){
- tablinks = document.getElementsByClassName("tabs");
- for(i = 0; i < tablinks.length; i++){
- tablinks[i].className = tablinks[i].className.replace(" active","");
- if(i == tabNum){
- tablinks[i].className += " active";
- }
- }
- tabs = document.getElementsByClassName("tab-text");
- for(i = 0; i < tabs.length; i++){
- tabs[i].className = tabs[i].className.replace(" active","");
- if(i == tabNum){
- tabs[i].className += " active";
- }
- }
- }
- SrkaReviewStars = Class.create();
- SrkaReviewStars.prototype = {
- initialize: function(reviewTableId){
- var _this = this;
- _this.ratingTable = $(reviewTableId);
- _this.ratings = {};
- _this.html = '';
- this.ratingTable.hide();
- this.ratingTable.select('tbody > tr').each(function(row, row_count){
- var ratingCode = row.select('.radio')[0].readAttribute('name');
- var ratingLabel = row.select('th')[0].innerHTML;
- var ratingOptions = [];
- row.select('.radio').each(function(radio){
- ratingOptions.push(radio.value);
- });
- _this.ratings[ratingCode] = {
- code: ratingCode,
- label: ratingLabel,
- options: ratingOptions
- };
- });
- _this.html += '<div id="srka-product-review-list" class="input-box">';
- for(var i in _this.ratings){
- var code_id = _this.ratings[i]['code'].replace(/[\[]/g, '_').replace(/[\]]/g, '');
- _this.html += '<div id="code-' + code_id + '" class="srka-rating-code">\n';
- _this.html += ' <div class="label">' + _this.ratings[i]['label'] + '</div>\n';
- _this.html += ' <ul class="options">\n';
- for(var j = 0; j < _this.ratings[i]['options'].length; j++){
- var option_id = 'srka-' + _this.ratings[i]['label'] + '_' + _this.ratings[i]['options'][j];
- _this.html += ' <li><a href="#" id="' + option_id + '" class="option" onclick="reviewStars.select(\'' + _this.ratings[i]['code'] + '\', ' + _this.ratings[i]['options'][j] + '); return false;"></a></li>\n';
- }
- _this.html += ' </ul>\n';
- _this.html += ' <div style="clear: both;"></div>\n';
- _this.html += '</div>\n';
- }
- _this.html += '</div>';
- //console.log(_this.ratings);
- //console.log(_this.html);
- this.ratingTable.insert({
- after: _this.html
- });
- },
- select: function(ratingCode, ratingOption){
- var options = this.ratings[ratingCode]['options'];
- this.ratingTable.select('.radio[value="' + ratingOption + '"]')[0].checked = true;
- for(var i = 0; i < options.length; i++){
- var srka_option_id = 'srka-' + this.ratings[ratingCode]['label'] + '_' + this.ratings[ratingCode]['options'][i];
- var option_id = srka_option_id.replace('srka-', '');
- if(options[i] <= ratingOption){
- $(srka_option_id).addClassName('selected');
- }else{
- $(srka_option_id).removeClassName('selected');
- }
- }
- }
- }
- </script>
- <script type="text/javascript">
- function setrequestlogin()
- {
- //jQuery("#productlistlogin").trigger("click");
- }
- </script>
- <style>
- .product-view .product-shop .product-name {
- width: 100%;
- }
- .dinfo {
- padding-top: 0px;float:left;
- }
- .zoom-notice,label.required::after, span.required::after,.product-options p.required {
- display:none;
- }
- .product-options-bottom { position :relative; bottom:10px !important;padding:15px 0; }
- .product-view .product-shop {
- float: left;
- width: 50%;
- }
- .wishlist img { display : none;}
- .usually { display : none; }
- .product-essential { position: relative !important; }
- <!-- remove black background after click on "save design" -->
- #ajaxlogin-mask { display : none }
- <!-- remove black background after click on "save design" -->
- </style>
Add Comment
Please, Sign In to add comment