Created
December 4, 2015 20:44
-
-
Save aedelgod/a41c6124a7f1974e582e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php $_helper = $this->helper('catalog/output'); ?> | |
<?php $_product = $this->getProduct(); | |
global $var_vttheme; | |
$colpage="one_column"; | |
if($_GET['colpage']) echo $colpage=$_GET['colpage']; | |
?> | |
<script type="text/javascript" src="<?php echo $this->getSkinUrl('js/jquery.fancybox.js') ?>"></script> | |
<script type="text/javascript" src="<?php echo $this->getSkinUrl('js/fancybox-buttons.js') ?>"></script> | |
<script type="text/javascript"> | |
var optionsPrice = new Product.OptionsPrice(<?php echo $this->getJsonConfig() ?>); | |
</script> | |
<div id="messages_product_view"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?></div> | |
<div class="product-view"> | |
<div class="product-essential"> | |
<!--div class="select-col-detail"> | |
<span class="title"><?php echo $this->__("Select column(s) page"); ?></span> | |
<div id="selected"> | |
<span class="select-col"> | |
<?php if($colpage=="one_column") echo "1 column"; | |
else if($colpage=="two_columns_left") echo "2 columns left"; | |
else if($colpage=="two_columns_right") echo "2 columns right"; | |
else echo "No select"; | |
?> | |
</span> | |
</div> | |
<?php | |
$cururl=Mage::helper("core/url")->getCurrentUrl(); | |
$cururl=substr($cururl,0, strpos($cururl,'?')); | |
?> | |
<ul class=""> | |
<li><a class="<?php if($colpage=="" || $colpage=="one_column") echo "actived" ?>" title="One column" href="<?php echo $cururl.'?colpage=one_column'; ?>"><span><?php echo $this->__("1 column") ?></span></a></li> | |
<li><a class="<?php if($colpage=="two_columns_left") echo "actived" ?>" title="2 columns left" href="<?php echo $cururl.'?colpage=two_columns_left'; ?>"><span><?php echo $this->__("2 columns left") ?></span></a></li> | |
<li><a class="<?php if($colpage=="two_columns_right") echo "actived" ?>" title="2 columns right" href="<?php echo $cururl.'?colpage=two_columns_right'; ?>"><span><?php echo $this->__("2 columns right") ?></span></a></li> | |
</ul> | |
</div--> | |
<div class="wrap-left-right"> | |
<div class="wrap-left"> | |
<div class="wrap"> | |
<form action="<?php echo $this->getSubmitUrl($_product) ?>" 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"> | |
<?php echo $this->getChildHtml('media') ?> | |
</div> | |
<div class="product-shop"> | |
<div class="product-name"> | |
<span class="name-product"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></span> | |
</div> | |
<div class="wrap-er"> | |
<?php if ($this->canEmailToFriend()): ?> | |
<p class="email-friend"><a href="<?php echo $this->helper('catalog/product')->getEmailToFriendUrl($_product) ?>"><?php echo $this->__('Email to a Friend') ?></a></p> | |
<?php endif; ?> | |
</div> | |
<!--<div class="product-code"><label>Product code:</label><?php //echo $_product->getSku(); ?></div>--> | |
<?php //if ($_product->getShortDescription()):?> | |
<!--div class="short-description"> | |
<?php /*<h2><?php echo $this->__('Quick Overview') ?></h2> */ ?> | |
<div class="std"><?php //echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?></div> | |
</div--> | |
<?php //endif;?> | |
<div class="brand"> | |
<span class="brand-title"><?php echo $this->__('Brand:'); ?></span> | |
<p class="brand-pro"><?php echo $_product->getResource()->getAttribute('manufacturer')->getFrontend()->getValue($_product) ?></p> | |
</div> | |
<?php echo $this->getChildHtml('alert_urls') ?> | |
<?php echo $this->getChildHtml('product_type_data') ?> | |
<div class="product-code"> | |
<span class="code-title"><?php echo $this->__('Product Code:'); ?></span> | |
<p class="code-pro"><?php echo $_product->getResource()->getAttribute('sku')->getFrontend()->getValue($_product); //or $sku = Mage::getModel('catalog/product')->load($_product->getId())->getSku(); ?></p> | |
</div> | |
<?php echo $this->getReviewsSummaryHtml($_product, false, true)?> | |
<?php echo $this->getTierPriceHtml() ?> | |
<?php echo $this->getChildHtml('extrahint') ?> | |
<?php if (!$this->hasOptions()):?> | |
<div class="product-options-bottom"> | |
<div class="add-to-box add-to-cart"> | |
<?php if($_product->isSaleable()): ?> | |
<?php echo $this->getChildHtml('addtocart') ?> | |
<?php if( $this->helper('wishlist')->isAllow() || $_compareUrl=$this->helper('catalog/product_compare')->getAddUrl($_product)): ?> | |
<!--<span class="or"><?php //echo $this->__('OR') ?></span>--> | |
<?php endif; ?> | |
<?php endif; ?> | |
<?php echo $this->getChildHtml('addto') ?> | |
</div> | |
<?php echo $this->getChildHtml('extra_buttons') ?> | |
</div> | |
<?php elseif (!$_product->isSaleable()): ?> | |
<div class="product-options-bottom"> | |
<div class="add-to-box add-to-cart"> | |
<?php echo $this->getChildHtml('addto') ?> | |
</div> | |
</div> | |
<?php endif; ?> | |
<?php //echo $this->getChildHtml('other');?> | |
<?php if ($_product->isSaleable() && $this->hasOptions()):?> | |
<?php echo $this->getChildChildHtml('container1', '', true, true) ?> | |
<?php endif;?> | |
<?php if ($_product->isSaleable() && $this->hasOptions()):?> | |
<?php echo $this->getChildChildHtml('container2', '', true, true) ?> | |
<?php endif;?> | |
<div class="wrap-addthis"> | |
<!-- AddThis Button BEGIN --> | |
<div class="addthis_toolbox addthis_default_style "> | |
<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a> | |
<?php if ($_product->getTypeId() != Mage_Catalog_Model_Product_Type::TYPE_BUNDLE) { ?> | |
<a class="addthis_button_tweet"></a> | |
<?php } ?> | |
<a class="addthis_button_pinterest_pinit" pi:pinit:layout="horizontal"></a> | |
<a class="addthis_counter addthis_pill_style"></a> | |
</div> | |
<script type="text/javascript">var addthis_config = {"data_track_addressbar":false};</script> | |
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-507b2455057cfd5f"></script> | |
<!-- AddThis Button END --> | |
</div> | |
</div> | |
<div id="product-tabs"> | |
<ul> | |
<?php if ($_description = $this->getChildHtml('description')):?> | |
<li> | |
<a href="#decription"><?php echo $this->__('Description') ?></a> | |
</li> | |
<?php if($additional = $this->getChildHtml('product.attributes')): ?> | |
<li> | |
<a href="#additional"><?php echo $this->__('Product Detail') ?></a> | |
</li> | |
<?php endif; ?> | |
<?php if($product_info_additional = $this->getChildHtml('product.info.additional')): ?> | |
<li> | |
<a href="#tags"><?php echo $this->__('Product Tags') ?></a></li> | |
<?php endif; ?> | |
<?php if($review_form = $this->getChildHtml('product_reviews')): ?> | |
<li> | |
<a href="#review"><?php echo $this->__('Reviews') ?></a> | |
</li> | |
<?php endif; ?> | |
<?php endif; ?> | |
<?php //$customBlock = $this->getLayout()->createBlock('cms/block')->setBlockId('custom-block')->toHtml();?> | |
<?php //if($customBlock) { ?> | |
<!--li> | |
<a href="#static-item">Static Block</a> | |
</li--> | |
<?php //}?> | |
</ul> | |
<div class="inner-tab"> | |
<?php if ( $_description ):?> | |
<div id="decription"> | |
<?php echo $_description ?> | |
</div> | |
<?php endif;?> | |
<?php if( $product_info_additional ): ?> | |
<div id="tags"> | |
<?php echo $product_info_additional; ?> | |
</div> | |
<?php endif;?> | |
<?php if($review_form): ?> | |
<div id="review"> | |
<?php echo $this->getChildHtml('product_reviews'); ?> | |
</div> | |
<?php endif;?> | |
<?php if($additional):?> | |
<div id="additional"> | |
<?php echo $additional; ?> | |
</div> | |
<?php endif;?> | |
<?php if($customBlock) { ?> | |
<div id="static-item"> | |
<?php echo $customBlock; ?> | |
</div> | |
<?php }?> | |
</div> | |
</div> | |
</form> | |
</div> | |
</div> | |
<div class="wrap-right"> | |
<?php echo $this->getChildHtml('catalog.product.related'); | |
echo $this->getLayout()->createBlock('cms/block')->setBlockId('block-advantis-detail')->toHtml(); ?> | |
</div> | |
<div><!-- end wrap div left - right --> | |
<?php echo $this->getChildHtml('upsell_products') ?> | |
<?php //echo $this->getChildHtml('catalog.product.related'); ?> | |
<script type="text/javascript"> | |
jQuery(document).ready( function() { | |
jQuery(".category-products").attr('class',''); | |
}); | |
jQuery("#product-tabs").ready( function($) { | |
jQuery("#product-tabs").innerTab(); | |
} ); | |
//<![CDATA[ | |
var productAddToCartForm = new VarienForm('product_addtocart_form'); | |
productAddToCartForm.submit = function(button, url) { | |
if (this.validator.validate()) { | |
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']; | |
// Remove custom datetime validators | |
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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment