magento 1.9x layout setting - single product page












0















especially magento geeks, I need a lil help. how can I move in stock, price, color switcher & add to cart option above description, tags & custom tap?
enter image description here



    <?php
$_helper = $this->helper('catalog/output');
$helper_richsnippets = $this->helper('porto/richsnippets');
$store = Mage::app()->getStore();
$code = $store->getCode();
?>
<?php $_product = $this->getProduct(); ?>
<?php
$product = Mage::getModel('catalog/product')->load($_product->getId());
$product_type = $_product->getTypeId();
$enabled_richsnippets = ($helper_richsnippets->isEnabled() && $product_type !== "grouped");
$price_properties = "";

if($enabled_richsnippets){
$price_properties = $helper_richsnippets->getPriceProperties($_product);
}

$enable_addtocart_sticky = Mage::getStoreConfig("porto_settings/product_view/enable_addtocart_sticky",$code);
$move_product_tab = Mage::getStoreConfig("porto_settings/product_view/move_product_tab",$code);
$sticky_header = "";
if(!Mage::getStoreConfig("porto_settings/header/sticky_header", $code))
$sticky_header = "no-sticky-header";
?>
<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 <?php if($move_product_tab): ?>moved-tab<?php endif;?>" <?php if($enabled_richsnippets): ?><?php echo $helper_richsnippets->getProductItemscope(); ?><?php endif; ?>>
<div class="product-essential">
<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>
<?php
if($enable_addtocart_sticky){
?>
<div class="sticky-product hide <?php echo $sticky_header; ?>">
<div class="container">
<?php
$aspect_ratio = Mage::getStoreConfig("porto_settings/product_view/aspect_ratio", $code);
$ratio_width = 600;
$ratio_height = 600;
if(Mage::getStoreConfig("porto_settings/product_view/ratio_width", $code))
$ratio_width = Mage::getStoreConfig("porto_settings/product_view/ratio_width", $code);
if(!$aspect_ratio){
if(Mage::getStoreConfig("porto_settings/product_view/ratio_height", $code))
$ratio_height = Mage::getStoreConfig("porto_settings/product_view/ratio_height", $code);
}
$ratio = $ratio_height / $ratio_width;
$ratio_width = 50;
$ratio_height = $ratio_width * $ratio;
?>
<div class="sticky-image">
<img src="<?php if($aspect_ratio):?><?php echo $this->helper('catalog/image')->init($_product, 'small_image')->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize(50);?><?php else: ?><?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize($ratio_width,$ratio_height); ?><?php endif; ?>" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>"/>
</div>
<div class="sticky-detail">
<div class="product-name-area">
<h2 class="product-name"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></h2>
<?php echo $this->getPriceHtml($_product, false, '_clone') ?>
</div>
<?php
if (Mage::helper('catalog')->isModuleEnabled('Mage_Review')):
?>
<?php
$review_html = $this->getReviewsSummaryHtml($product, 'short');
if($review_html){
echo $review_html;
}else{
?>
<div class="ratings">
<div class="rating-box">
<div class="rating" style="width:0"></div>
</div>
</div>
<?php
}
?>
<?php else: ?>
<div class="ratings">
<div class="rating-box">
<div class="rating" style="width:0"></div>
</div>
</div>
<?php endif; ?>
<?php if($enabled_richsnippets): ?>
<?php if ($this->getReviewsCount()): ?>
<span itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
<meta itemprop="ratingValue" content="<?php echo $this->getRatingSummary(); ?>"/>
<meta itemprop="reviewCount" content="<?php echo $this->getReviewsCount(); ?>" />
<meta itemprop="bestRating" content="100"/>
<meta itemprop="worstRating" content="0"/>
</span>
<?php endif; ?>
<?php endif; ?>
<?php if ($_product->isAvailable()): ?>
<p class="availability in-stock"><span>(<?php echo $this->__('In stock') ?>)</span></p>
<?php else: ?>
<p class="availability out-of-stock"><span>(<?php echo $this->__('Out of stock') ?>)</span></p>
<?php endif; ?>
</div>
<?php if($_product->isSaleable()): ?>
<?php $buttonTitle = $this->__('Add to Cart'); ?>
<div class="add-to-cart">
<button type="button" title="<?php echo $buttonTitle ?>" class="button btn-cart" onclick="productAddToCartForm.submit(this)"><span><span><i class="icon-cart"></i><?php echo $buttonTitle ?></span></span></button>
</div>
<?php endif; ?>
</div>
</div>
<?php
}
?>
<div class="row">
<div class="product-img-box col-sm-<?php echo Mage::getStoreConfig("porto_settings/product_view/product_image_size", $code); ?> <?php echo Mage::getStoreConfig("porto_settings/product_view/thumbnail_image_type", $code); ?>">
<?php echo $this->getChildHtml('media') ?>
</div>
<div class="product-shop col-sm-<?php echo 12-Mage::getStoreConfig("porto_settings/product_view/product_image_size", $code); ?>">
<?php
if (Mage::getStoreConfig("porto_settings/product_view/prev_next",$code)){
?>
<div class="prev-next-products">
<?php $_prev = Mage::helper('porto')->getPreviousProduct(); ?>
<?php $_next = Mage::helper('porto')->getNextProduct(); ?>

<?php if($_prev): ?>
<div class="product-nav product-prev">
<a href="<?php echo $_prev->getProductUrl();?>" title="<?php echo $this->__("Previous Product"); ?>">
<?php echo Mage::getStoreConfig("porto_settings/product_view/prev_text",$code); ?>
</a>
<div class="product-pop theme-border-color">
<?php
$image_src = $this->helper('catalog/image')->init($_prev, 'image')->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize(80);
?>
<img class="product-image" src="<?php echo $image_src; ?>" alt="<?php echo $this->__('Previous');?>"/>
<h3 class="product-name"><?php echo $_helper->productAttribute($_prev, $_prev->getName(), 'name') ?></h3>
</div>
</div>
<?php endif; ?>
<?php if($_next): ?>
<div class="product-nav product-next">
<a class="product-next" href="<?php echo $_next->getProductUrl();?>" title="<?php echo $this->__("Next Product"); ?>"><?php echo Mage::getStoreConfig("porto_settings/product_view/next_text",$code); ?></a>
<div class="product-pop theme-border-color">
<?php
$image_src = $this->helper('catalog/image')->init($_next, 'image')->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize(80);
?>
<img class="product-image" src="<?php echo $image_src; ?>" alt="<?php echo $this->__('Previous');?>"/>
<h3 class="product-name"><?php echo $_helper->productAttribute($_next, $_next->getName(), 'name') ?></h3>
</div>
</div>
<?php endif; ?>
</div>
<?php
}
?>
<div class="product-name">
<h1 <?php if($enabled_richsnippets): ?>itemprop="name"<?php endif; ?>><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></h1>
</div>
<?php if($enabled_richsnippets): ?>
<?php
$storeId = Mage::app()->getStore()->getId();
$summaryData = Mage::getModel('review/review_summary')->setStoreId($storeId)->load($_product->getId());
?>
<?php if ($summaryData['reviews_count']): ?>
<span itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating" class="no-display">
<span itemprop="ratingValue"><?php echo $summaryData['rating_summary']; ?></span>
<span itemprop="reviewCount"><?php echo $summaryData['reviews_count']; ?></span>
<span itemprop="bestRating">100</span>
<span itemprop="worstRating">0</span>
</span>
<?php endif; ?>
<?php endif; ?>

<?php echo $this->getReviewsSummaryHtml($_product, false, true)?>
<?php if ($_product->getShortDescription()):?>
<div class="short-description">
<h2><?php echo $this->__('Quick Overview') ?></h2>
<div class="std" <?php if($enabled_richsnippets): ?>itemprop="description"<?php endif; ?>><?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?></div>
</div>
<?php endif;?>
<div class="product-info">
<div <?php if($enabled_richsnippets) echo $helper_richsnippets->getOfferItemscope(); ?>>
<?php echo $this->getChildHtml('product_type_data'); ?>
<?php echo $this->getTierPriceHtml(); ?>
<?php echo $price_properties; ?>
</div>
<?php echo $this->getChildHtml('extrahint') ?>
<?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; ?>
<?php if($sku = $_product->getSku()): ?>
<?php if($enabled_richsnippets): ?><meta itemprop="productID" content="sku:<?php echo $sku; ?>" /><?php endif; ?>
<?php endif; ?>
<?php echo $this->getChildHtml('alert_urls') ?>
<?php echo $this->getChildHtml('other');?>
</div>
<?php if (!$this->hasOptions()):?>
<div class="clearer"></div>
<div class="add-to-box">
<?php if($_product->isSaleable()): ?>
<?php echo $this->getChildHtml('addtocart') ?>
<?php if( $this->helper('wishlist')->isAllow() || $_compareUrl=$this->helper('catalog/product_compare')->getAddUrl($_product)): ?>
<?php endif; ?>
<?php endif; ?>
<?php echo $this->getChildHtml('addto') ?>
</div>
<?php echo $this->getChildHtml('extra_buttons') ?>
<?php elseif (!$_product->isSaleable()): ?>
<div class="clearer"></div>
<div class="add-to-box">
<?php echo $this->getChildHtml('addto') ?>
</div>
<?php endif; ?>

<?php if ($_product->isSaleable() && $this->hasOptions()):?>
<?php echo $this->getChildChildHtml('container1', '', true, true) ?>
<?php endif;?>
<div class="clearer"></div>
<?php echo $this->getChildHtml('addthis_sharetool'); ?>
</div>

</div>
<?php if ($_product->isSaleable() && $this->hasOptions()):?>
<?php echo $this->getChildChildHtml('container2', '', true, true) ?>
<?php endif;?>
</form>
<?php if(Mage::getStoreConfig('ajaxcart/addtocart/enableproduct') && (Mage::app()->getFrontController()->getRequest()->getModuleName() == "catalog") || (Mage::app()->getFrontController()->getRequest()->getModuleName() == "quickview")): ?>
<script type="text/javascript">
//<![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;
if (!url) {
url = jQuery('#product_addtocart_form').attr('action');
}
if(url.indexOf("wishlist/index/cart") != -1){
url = url.replace("wishlist/index/cart","ajaxcart/index/add"); // New Code
} else {
url = url.replace("checkout/cart","ajaxcart/index"); // New Code
}
url = url.replace("http://", "//");
url = url.replace("https://", "//");
var data = jQuery('#product_addtocart_form').serialize();
data += '&isAjax=1';
var is_quickview = false;
if(jQuery("body").hasClass("quickview-index-view")){
is_quickview = true;
}
if(is_quickview)
window.parent.jQuery("#loading-mask").show();
else
jQuery('#loading-mask').show();
try {
jQuery.ajax({
url : url,
dataType : 'json',
type : 'post',
data : data,
success : function(data) {
if(is_quickview)
window.parent.jQuery('#loading-mask').hide();
else
jQuery('#loading-mask').hide();
if(data.status == 'ERROR'){
if(is_quickview)
window.parent.alert(data.message.replace("<br/>",""));
else
alert(data.message.replace("<br/>",""));
}else{
if(is_quickview){
if(window.parent.jQuery('.header-container .mini-cart')){
window.parent.jQuery('.header-container .mini-cart').replaceWith(data.toplink);
}
if(window.parent.jQuery('.fixed-header .mini-cart')){
window.parent.jQuery('.fixed-header .mini-cart').replaceWith(data.toplink);
}
if(window.parent.jQuery('.sticky-header .mini-cart')){
window.parent.jQuery('.sticky-header .mini-cart').replaceWith(data.toplink);
}
if(window.parent.jQuery('.col-right .block.block-cart')){
window.parent.jQuery('.col-right .block.block-cart').replaceWith(data.cart_sidebar);
}
window.parent.jQuery('#after-loading-success-message #success-message-container .msg-box').html(data.message);
<?php $autoclose = Mage::getStoreConfig('ajaxcart/addtocart/autoclose', $code);?>
ajaxcart_sec = <?php echo ($autoclose && is_numeric($autoclose))?$autoclose:5; ?>;
timer_sec = ajaxcart_sec;
window.parent.jQuery('#after-loading-success-message').fadeIn(200);
ajaxcart_timer = setInterval(function(){
timer_sec --;
window.parent.jQuery('#after-loading-success-message .timer').html(timer_sec);
},1000)
setTimeout(function(){
window.parent.jQuery('#after-loading-success-message').fadeOut(200);
clearTimeout(ajaxcart_timer);
setTimeout(function(){
window.parent.jQuery('#after-loading-success-message .timer').html(ajaxcart_sec);
}, 1000);
},ajaxcart_sec*1000);
}
else {
if(jQuery('.header-container .mini-cart')){
jQuery('.header-container .mini-cart').replaceWith(data.toplink);
}
if(jQuery('.fixed-header .mini-cart')){
jQuery('.fixed-header .mini-cart').replaceWith(data.toplink);
}
if(jQuery('.sticky-header .mini-cart')){
jQuery('.sticky-header .mini-cart').replaceWith(data.toplink);
}
if(jQuery('.col-right .block.block-cart')){
jQuery('.col-right .block.block-cart').replaceWith(data.cart_sidebar);
}
jQuery('#after-loading-success-message #success-message-container .msg-box').html(data.message);
<?php $autoclose = Mage::getStoreConfig('ajaxcart/addtocart/autoclose', $code);?>
ajaxcart_sec = <?php echo ($autoclose && is_numeric($autoclose))?$autoclose:5; ?>;
timer_sec = ajaxcart_sec;
jQuery('#after-loading-success-message').fadeIn(200);
ajaxcart_timer = setInterval(function(){
timer_sec --;
jQuery('#after-loading-success-message .timer').html(timer_sec);
},1000)
setTimeout(function(){
jQuery('#after-loading-success-message').fadeOut(200);
clearTimeout(ajaxcart_timer);
setTimeout(function(){
jQuery('#after-loading-success-message .timer').html(ajaxcart_sec);
}, 1000);
},ajaxcart_sec*1000);
}
}
}
});
} catch (e) {
}
this.form.action = oldUrl;
if (e) {
throw e;
}
} else {
if(jQuery('#product-options-wrapper'))
jQuery('#product-options-wrapper').scrollToMe();
}
}.bind(productAddToCartForm);
//]]>
</script>
<?php else : ?>
<script type="text/javascript">
//<![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;
}
} else {
if(jQuery('#product-options-wrapper'))
jQuery('#product-options-wrapper').scrollToMe();
}
}.bind(productAddToCartForm);
//]]>
</script>
<?php endif; ?>
<script type="text/javascript">
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);
} else {
if(jQuery('#product-options-wrapper'))
jQuery('#product-options-wrapper').scrollToMe();
}
}.bind(productAddToCartForm);
</script>
</div>

<div class="product-collateral">
<?php echo $this->getChildHtml('product_additional_data'); ?>
</div>
<?php echo $this->getChildHtml('upsell_products'); ?>
</div>
<script type="text/javascript">
jQuery(function($){
$("body.quickview-index-view .no-rating a, body.quickview-index-view .ratings a").off('click').on("click",function(e){
window.parent.location.href = $(this).attr("href");
window.parent.jQuery.fancybox.close();
});
<?php
if($enable_addtocart_sticky){
?>
p_scrolled = false;
$(window).scroll(function(){
if(400<$(window).scrollTop() && !p_scrolled){
$('.sticky-product').removeClass("hide");
p_scrolled = true;
}
if(400>=$(window).scrollTop() && p_scrolled){
$('.sticky-product').addClass("hide");
p_scrolled = false;
}
});
<?php
}
?>
<?php
if($move_product_tab){
?>
$(".product-info").before($(".product-tabs"));
<?php
}
?>
});
</script>


enter image description here










share|improve this question
















bumped to the homepage by Community 3 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • It would be better to include the code of that file in question. Most people would not be comfortable to follow a link that downloads a '.rar' file. It will also work in case link goes dead in future.

    – Prateek
    Jul 6 '16 at 8:28
















0















especially magento geeks, I need a lil help. how can I move in stock, price, color switcher & add to cart option above description, tags & custom tap?
enter image description here



    <?php
$_helper = $this->helper('catalog/output');
$helper_richsnippets = $this->helper('porto/richsnippets');
$store = Mage::app()->getStore();
$code = $store->getCode();
?>
<?php $_product = $this->getProduct(); ?>
<?php
$product = Mage::getModel('catalog/product')->load($_product->getId());
$product_type = $_product->getTypeId();
$enabled_richsnippets = ($helper_richsnippets->isEnabled() && $product_type !== "grouped");
$price_properties = "";

if($enabled_richsnippets){
$price_properties = $helper_richsnippets->getPriceProperties($_product);
}

$enable_addtocart_sticky = Mage::getStoreConfig("porto_settings/product_view/enable_addtocart_sticky",$code);
$move_product_tab = Mage::getStoreConfig("porto_settings/product_view/move_product_tab",$code);
$sticky_header = "";
if(!Mage::getStoreConfig("porto_settings/header/sticky_header", $code))
$sticky_header = "no-sticky-header";
?>
<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 <?php if($move_product_tab): ?>moved-tab<?php endif;?>" <?php if($enabled_richsnippets): ?><?php echo $helper_richsnippets->getProductItemscope(); ?><?php endif; ?>>
<div class="product-essential">
<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>
<?php
if($enable_addtocart_sticky){
?>
<div class="sticky-product hide <?php echo $sticky_header; ?>">
<div class="container">
<?php
$aspect_ratio = Mage::getStoreConfig("porto_settings/product_view/aspect_ratio", $code);
$ratio_width = 600;
$ratio_height = 600;
if(Mage::getStoreConfig("porto_settings/product_view/ratio_width", $code))
$ratio_width = Mage::getStoreConfig("porto_settings/product_view/ratio_width", $code);
if(!$aspect_ratio){
if(Mage::getStoreConfig("porto_settings/product_view/ratio_height", $code))
$ratio_height = Mage::getStoreConfig("porto_settings/product_view/ratio_height", $code);
}
$ratio = $ratio_height / $ratio_width;
$ratio_width = 50;
$ratio_height = $ratio_width * $ratio;
?>
<div class="sticky-image">
<img src="<?php if($aspect_ratio):?><?php echo $this->helper('catalog/image')->init($_product, 'small_image')->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize(50);?><?php else: ?><?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize($ratio_width,$ratio_height); ?><?php endif; ?>" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>"/>
</div>
<div class="sticky-detail">
<div class="product-name-area">
<h2 class="product-name"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></h2>
<?php echo $this->getPriceHtml($_product, false, '_clone') ?>
</div>
<?php
if (Mage::helper('catalog')->isModuleEnabled('Mage_Review')):
?>
<?php
$review_html = $this->getReviewsSummaryHtml($product, 'short');
if($review_html){
echo $review_html;
}else{
?>
<div class="ratings">
<div class="rating-box">
<div class="rating" style="width:0"></div>
</div>
</div>
<?php
}
?>
<?php else: ?>
<div class="ratings">
<div class="rating-box">
<div class="rating" style="width:0"></div>
</div>
</div>
<?php endif; ?>
<?php if($enabled_richsnippets): ?>
<?php if ($this->getReviewsCount()): ?>
<span itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
<meta itemprop="ratingValue" content="<?php echo $this->getRatingSummary(); ?>"/>
<meta itemprop="reviewCount" content="<?php echo $this->getReviewsCount(); ?>" />
<meta itemprop="bestRating" content="100"/>
<meta itemprop="worstRating" content="0"/>
</span>
<?php endif; ?>
<?php endif; ?>
<?php if ($_product->isAvailable()): ?>
<p class="availability in-stock"><span>(<?php echo $this->__('In stock') ?>)</span></p>
<?php else: ?>
<p class="availability out-of-stock"><span>(<?php echo $this->__('Out of stock') ?>)</span></p>
<?php endif; ?>
</div>
<?php if($_product->isSaleable()): ?>
<?php $buttonTitle = $this->__('Add to Cart'); ?>
<div class="add-to-cart">
<button type="button" title="<?php echo $buttonTitle ?>" class="button btn-cart" onclick="productAddToCartForm.submit(this)"><span><span><i class="icon-cart"></i><?php echo $buttonTitle ?></span></span></button>
</div>
<?php endif; ?>
</div>
</div>
<?php
}
?>
<div class="row">
<div class="product-img-box col-sm-<?php echo Mage::getStoreConfig("porto_settings/product_view/product_image_size", $code); ?> <?php echo Mage::getStoreConfig("porto_settings/product_view/thumbnail_image_type", $code); ?>">
<?php echo $this->getChildHtml('media') ?>
</div>
<div class="product-shop col-sm-<?php echo 12-Mage::getStoreConfig("porto_settings/product_view/product_image_size", $code); ?>">
<?php
if (Mage::getStoreConfig("porto_settings/product_view/prev_next",$code)){
?>
<div class="prev-next-products">
<?php $_prev = Mage::helper('porto')->getPreviousProduct(); ?>
<?php $_next = Mage::helper('porto')->getNextProduct(); ?>

<?php if($_prev): ?>
<div class="product-nav product-prev">
<a href="<?php echo $_prev->getProductUrl();?>" title="<?php echo $this->__("Previous Product"); ?>">
<?php echo Mage::getStoreConfig("porto_settings/product_view/prev_text",$code); ?>
</a>
<div class="product-pop theme-border-color">
<?php
$image_src = $this->helper('catalog/image')->init($_prev, 'image')->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize(80);
?>
<img class="product-image" src="<?php echo $image_src; ?>" alt="<?php echo $this->__('Previous');?>"/>
<h3 class="product-name"><?php echo $_helper->productAttribute($_prev, $_prev->getName(), 'name') ?></h3>
</div>
</div>
<?php endif; ?>
<?php if($_next): ?>
<div class="product-nav product-next">
<a class="product-next" href="<?php echo $_next->getProductUrl();?>" title="<?php echo $this->__("Next Product"); ?>"><?php echo Mage::getStoreConfig("porto_settings/product_view/next_text",$code); ?></a>
<div class="product-pop theme-border-color">
<?php
$image_src = $this->helper('catalog/image')->init($_next, 'image')->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize(80);
?>
<img class="product-image" src="<?php echo $image_src; ?>" alt="<?php echo $this->__('Previous');?>"/>
<h3 class="product-name"><?php echo $_helper->productAttribute($_next, $_next->getName(), 'name') ?></h3>
</div>
</div>
<?php endif; ?>
</div>
<?php
}
?>
<div class="product-name">
<h1 <?php if($enabled_richsnippets): ?>itemprop="name"<?php endif; ?>><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></h1>
</div>
<?php if($enabled_richsnippets): ?>
<?php
$storeId = Mage::app()->getStore()->getId();
$summaryData = Mage::getModel('review/review_summary')->setStoreId($storeId)->load($_product->getId());
?>
<?php if ($summaryData['reviews_count']): ?>
<span itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating" class="no-display">
<span itemprop="ratingValue"><?php echo $summaryData['rating_summary']; ?></span>
<span itemprop="reviewCount"><?php echo $summaryData['reviews_count']; ?></span>
<span itemprop="bestRating">100</span>
<span itemprop="worstRating">0</span>
</span>
<?php endif; ?>
<?php endif; ?>

<?php echo $this->getReviewsSummaryHtml($_product, false, true)?>
<?php if ($_product->getShortDescription()):?>
<div class="short-description">
<h2><?php echo $this->__('Quick Overview') ?></h2>
<div class="std" <?php if($enabled_richsnippets): ?>itemprop="description"<?php endif; ?>><?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?></div>
</div>
<?php endif;?>
<div class="product-info">
<div <?php if($enabled_richsnippets) echo $helper_richsnippets->getOfferItemscope(); ?>>
<?php echo $this->getChildHtml('product_type_data'); ?>
<?php echo $this->getTierPriceHtml(); ?>
<?php echo $price_properties; ?>
</div>
<?php echo $this->getChildHtml('extrahint') ?>
<?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; ?>
<?php if($sku = $_product->getSku()): ?>
<?php if($enabled_richsnippets): ?><meta itemprop="productID" content="sku:<?php echo $sku; ?>" /><?php endif; ?>
<?php endif; ?>
<?php echo $this->getChildHtml('alert_urls') ?>
<?php echo $this->getChildHtml('other');?>
</div>
<?php if (!$this->hasOptions()):?>
<div class="clearer"></div>
<div class="add-to-box">
<?php if($_product->isSaleable()): ?>
<?php echo $this->getChildHtml('addtocart') ?>
<?php if( $this->helper('wishlist')->isAllow() || $_compareUrl=$this->helper('catalog/product_compare')->getAddUrl($_product)): ?>
<?php endif; ?>
<?php endif; ?>
<?php echo $this->getChildHtml('addto') ?>
</div>
<?php echo $this->getChildHtml('extra_buttons') ?>
<?php elseif (!$_product->isSaleable()): ?>
<div class="clearer"></div>
<div class="add-to-box">
<?php echo $this->getChildHtml('addto') ?>
</div>
<?php endif; ?>

<?php if ($_product->isSaleable() && $this->hasOptions()):?>
<?php echo $this->getChildChildHtml('container1', '', true, true) ?>
<?php endif;?>
<div class="clearer"></div>
<?php echo $this->getChildHtml('addthis_sharetool'); ?>
</div>

</div>
<?php if ($_product->isSaleable() && $this->hasOptions()):?>
<?php echo $this->getChildChildHtml('container2', '', true, true) ?>
<?php endif;?>
</form>
<?php if(Mage::getStoreConfig('ajaxcart/addtocart/enableproduct') && (Mage::app()->getFrontController()->getRequest()->getModuleName() == "catalog") || (Mage::app()->getFrontController()->getRequest()->getModuleName() == "quickview")): ?>
<script type="text/javascript">
//<![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;
if (!url) {
url = jQuery('#product_addtocart_form').attr('action');
}
if(url.indexOf("wishlist/index/cart") != -1){
url = url.replace("wishlist/index/cart","ajaxcart/index/add"); // New Code
} else {
url = url.replace("checkout/cart","ajaxcart/index"); // New Code
}
url = url.replace("http://", "//");
url = url.replace("https://", "//");
var data = jQuery('#product_addtocart_form').serialize();
data += '&isAjax=1';
var is_quickview = false;
if(jQuery("body").hasClass("quickview-index-view")){
is_quickview = true;
}
if(is_quickview)
window.parent.jQuery("#loading-mask").show();
else
jQuery('#loading-mask').show();
try {
jQuery.ajax({
url : url,
dataType : 'json',
type : 'post',
data : data,
success : function(data) {
if(is_quickview)
window.parent.jQuery('#loading-mask').hide();
else
jQuery('#loading-mask').hide();
if(data.status == 'ERROR'){
if(is_quickview)
window.parent.alert(data.message.replace("<br/>",""));
else
alert(data.message.replace("<br/>",""));
}else{
if(is_quickview){
if(window.parent.jQuery('.header-container .mini-cart')){
window.parent.jQuery('.header-container .mini-cart').replaceWith(data.toplink);
}
if(window.parent.jQuery('.fixed-header .mini-cart')){
window.parent.jQuery('.fixed-header .mini-cart').replaceWith(data.toplink);
}
if(window.parent.jQuery('.sticky-header .mini-cart')){
window.parent.jQuery('.sticky-header .mini-cart').replaceWith(data.toplink);
}
if(window.parent.jQuery('.col-right .block.block-cart')){
window.parent.jQuery('.col-right .block.block-cart').replaceWith(data.cart_sidebar);
}
window.parent.jQuery('#after-loading-success-message #success-message-container .msg-box').html(data.message);
<?php $autoclose = Mage::getStoreConfig('ajaxcart/addtocart/autoclose', $code);?>
ajaxcart_sec = <?php echo ($autoclose && is_numeric($autoclose))?$autoclose:5; ?>;
timer_sec = ajaxcart_sec;
window.parent.jQuery('#after-loading-success-message').fadeIn(200);
ajaxcart_timer = setInterval(function(){
timer_sec --;
window.parent.jQuery('#after-loading-success-message .timer').html(timer_sec);
},1000)
setTimeout(function(){
window.parent.jQuery('#after-loading-success-message').fadeOut(200);
clearTimeout(ajaxcart_timer);
setTimeout(function(){
window.parent.jQuery('#after-loading-success-message .timer').html(ajaxcart_sec);
}, 1000);
},ajaxcart_sec*1000);
}
else {
if(jQuery('.header-container .mini-cart')){
jQuery('.header-container .mini-cart').replaceWith(data.toplink);
}
if(jQuery('.fixed-header .mini-cart')){
jQuery('.fixed-header .mini-cart').replaceWith(data.toplink);
}
if(jQuery('.sticky-header .mini-cart')){
jQuery('.sticky-header .mini-cart').replaceWith(data.toplink);
}
if(jQuery('.col-right .block.block-cart')){
jQuery('.col-right .block.block-cart').replaceWith(data.cart_sidebar);
}
jQuery('#after-loading-success-message #success-message-container .msg-box').html(data.message);
<?php $autoclose = Mage::getStoreConfig('ajaxcart/addtocart/autoclose', $code);?>
ajaxcart_sec = <?php echo ($autoclose && is_numeric($autoclose))?$autoclose:5; ?>;
timer_sec = ajaxcart_sec;
jQuery('#after-loading-success-message').fadeIn(200);
ajaxcart_timer = setInterval(function(){
timer_sec --;
jQuery('#after-loading-success-message .timer').html(timer_sec);
},1000)
setTimeout(function(){
jQuery('#after-loading-success-message').fadeOut(200);
clearTimeout(ajaxcart_timer);
setTimeout(function(){
jQuery('#after-loading-success-message .timer').html(ajaxcart_sec);
}, 1000);
},ajaxcart_sec*1000);
}
}
}
});
} catch (e) {
}
this.form.action = oldUrl;
if (e) {
throw e;
}
} else {
if(jQuery('#product-options-wrapper'))
jQuery('#product-options-wrapper').scrollToMe();
}
}.bind(productAddToCartForm);
//]]>
</script>
<?php else : ?>
<script type="text/javascript">
//<![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;
}
} else {
if(jQuery('#product-options-wrapper'))
jQuery('#product-options-wrapper').scrollToMe();
}
}.bind(productAddToCartForm);
//]]>
</script>
<?php endif; ?>
<script type="text/javascript">
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);
} else {
if(jQuery('#product-options-wrapper'))
jQuery('#product-options-wrapper').scrollToMe();
}
}.bind(productAddToCartForm);
</script>
</div>

<div class="product-collateral">
<?php echo $this->getChildHtml('product_additional_data'); ?>
</div>
<?php echo $this->getChildHtml('upsell_products'); ?>
</div>
<script type="text/javascript">
jQuery(function($){
$("body.quickview-index-view .no-rating a, body.quickview-index-view .ratings a").off('click').on("click",function(e){
window.parent.location.href = $(this).attr("href");
window.parent.jQuery.fancybox.close();
});
<?php
if($enable_addtocart_sticky){
?>
p_scrolled = false;
$(window).scroll(function(){
if(400<$(window).scrollTop() && !p_scrolled){
$('.sticky-product').removeClass("hide");
p_scrolled = true;
}
if(400>=$(window).scrollTop() && p_scrolled){
$('.sticky-product').addClass("hide");
p_scrolled = false;
}
});
<?php
}
?>
<?php
if($move_product_tab){
?>
$(".product-info").before($(".product-tabs"));
<?php
}
?>
});
</script>


enter image description here










share|improve this question
















bumped to the homepage by Community 3 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • It would be better to include the code of that file in question. Most people would not be comfortable to follow a link that downloads a '.rar' file. It will also work in case link goes dead in future.

    – Prateek
    Jul 6 '16 at 8:28














0












0








0








especially magento geeks, I need a lil help. how can I move in stock, price, color switcher & add to cart option above description, tags & custom tap?
enter image description here



    <?php
$_helper = $this->helper('catalog/output');
$helper_richsnippets = $this->helper('porto/richsnippets');
$store = Mage::app()->getStore();
$code = $store->getCode();
?>
<?php $_product = $this->getProduct(); ?>
<?php
$product = Mage::getModel('catalog/product')->load($_product->getId());
$product_type = $_product->getTypeId();
$enabled_richsnippets = ($helper_richsnippets->isEnabled() && $product_type !== "grouped");
$price_properties = "";

if($enabled_richsnippets){
$price_properties = $helper_richsnippets->getPriceProperties($_product);
}

$enable_addtocart_sticky = Mage::getStoreConfig("porto_settings/product_view/enable_addtocart_sticky",$code);
$move_product_tab = Mage::getStoreConfig("porto_settings/product_view/move_product_tab",$code);
$sticky_header = "";
if(!Mage::getStoreConfig("porto_settings/header/sticky_header", $code))
$sticky_header = "no-sticky-header";
?>
<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 <?php if($move_product_tab): ?>moved-tab<?php endif;?>" <?php if($enabled_richsnippets): ?><?php echo $helper_richsnippets->getProductItemscope(); ?><?php endif; ?>>
<div class="product-essential">
<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>
<?php
if($enable_addtocart_sticky){
?>
<div class="sticky-product hide <?php echo $sticky_header; ?>">
<div class="container">
<?php
$aspect_ratio = Mage::getStoreConfig("porto_settings/product_view/aspect_ratio", $code);
$ratio_width = 600;
$ratio_height = 600;
if(Mage::getStoreConfig("porto_settings/product_view/ratio_width", $code))
$ratio_width = Mage::getStoreConfig("porto_settings/product_view/ratio_width", $code);
if(!$aspect_ratio){
if(Mage::getStoreConfig("porto_settings/product_view/ratio_height", $code))
$ratio_height = Mage::getStoreConfig("porto_settings/product_view/ratio_height", $code);
}
$ratio = $ratio_height / $ratio_width;
$ratio_width = 50;
$ratio_height = $ratio_width * $ratio;
?>
<div class="sticky-image">
<img src="<?php if($aspect_ratio):?><?php echo $this->helper('catalog/image')->init($_product, 'small_image')->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize(50);?><?php else: ?><?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize($ratio_width,$ratio_height); ?><?php endif; ?>" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>"/>
</div>
<div class="sticky-detail">
<div class="product-name-area">
<h2 class="product-name"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></h2>
<?php echo $this->getPriceHtml($_product, false, '_clone') ?>
</div>
<?php
if (Mage::helper('catalog')->isModuleEnabled('Mage_Review')):
?>
<?php
$review_html = $this->getReviewsSummaryHtml($product, 'short');
if($review_html){
echo $review_html;
}else{
?>
<div class="ratings">
<div class="rating-box">
<div class="rating" style="width:0"></div>
</div>
</div>
<?php
}
?>
<?php else: ?>
<div class="ratings">
<div class="rating-box">
<div class="rating" style="width:0"></div>
</div>
</div>
<?php endif; ?>
<?php if($enabled_richsnippets): ?>
<?php if ($this->getReviewsCount()): ?>
<span itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
<meta itemprop="ratingValue" content="<?php echo $this->getRatingSummary(); ?>"/>
<meta itemprop="reviewCount" content="<?php echo $this->getReviewsCount(); ?>" />
<meta itemprop="bestRating" content="100"/>
<meta itemprop="worstRating" content="0"/>
</span>
<?php endif; ?>
<?php endif; ?>
<?php if ($_product->isAvailable()): ?>
<p class="availability in-stock"><span>(<?php echo $this->__('In stock') ?>)</span></p>
<?php else: ?>
<p class="availability out-of-stock"><span>(<?php echo $this->__('Out of stock') ?>)</span></p>
<?php endif; ?>
</div>
<?php if($_product->isSaleable()): ?>
<?php $buttonTitle = $this->__('Add to Cart'); ?>
<div class="add-to-cart">
<button type="button" title="<?php echo $buttonTitle ?>" class="button btn-cart" onclick="productAddToCartForm.submit(this)"><span><span><i class="icon-cart"></i><?php echo $buttonTitle ?></span></span></button>
</div>
<?php endif; ?>
</div>
</div>
<?php
}
?>
<div class="row">
<div class="product-img-box col-sm-<?php echo Mage::getStoreConfig("porto_settings/product_view/product_image_size", $code); ?> <?php echo Mage::getStoreConfig("porto_settings/product_view/thumbnail_image_type", $code); ?>">
<?php echo $this->getChildHtml('media') ?>
</div>
<div class="product-shop col-sm-<?php echo 12-Mage::getStoreConfig("porto_settings/product_view/product_image_size", $code); ?>">
<?php
if (Mage::getStoreConfig("porto_settings/product_view/prev_next",$code)){
?>
<div class="prev-next-products">
<?php $_prev = Mage::helper('porto')->getPreviousProduct(); ?>
<?php $_next = Mage::helper('porto')->getNextProduct(); ?>

<?php if($_prev): ?>
<div class="product-nav product-prev">
<a href="<?php echo $_prev->getProductUrl();?>" title="<?php echo $this->__("Previous Product"); ?>">
<?php echo Mage::getStoreConfig("porto_settings/product_view/prev_text",$code); ?>
</a>
<div class="product-pop theme-border-color">
<?php
$image_src = $this->helper('catalog/image')->init($_prev, 'image')->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize(80);
?>
<img class="product-image" src="<?php echo $image_src; ?>" alt="<?php echo $this->__('Previous');?>"/>
<h3 class="product-name"><?php echo $_helper->productAttribute($_prev, $_prev->getName(), 'name') ?></h3>
</div>
</div>
<?php endif; ?>
<?php if($_next): ?>
<div class="product-nav product-next">
<a class="product-next" href="<?php echo $_next->getProductUrl();?>" title="<?php echo $this->__("Next Product"); ?>"><?php echo Mage::getStoreConfig("porto_settings/product_view/next_text",$code); ?></a>
<div class="product-pop theme-border-color">
<?php
$image_src = $this->helper('catalog/image')->init($_next, 'image')->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize(80);
?>
<img class="product-image" src="<?php echo $image_src; ?>" alt="<?php echo $this->__('Previous');?>"/>
<h3 class="product-name"><?php echo $_helper->productAttribute($_next, $_next->getName(), 'name') ?></h3>
</div>
</div>
<?php endif; ?>
</div>
<?php
}
?>
<div class="product-name">
<h1 <?php if($enabled_richsnippets): ?>itemprop="name"<?php endif; ?>><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></h1>
</div>
<?php if($enabled_richsnippets): ?>
<?php
$storeId = Mage::app()->getStore()->getId();
$summaryData = Mage::getModel('review/review_summary')->setStoreId($storeId)->load($_product->getId());
?>
<?php if ($summaryData['reviews_count']): ?>
<span itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating" class="no-display">
<span itemprop="ratingValue"><?php echo $summaryData['rating_summary']; ?></span>
<span itemprop="reviewCount"><?php echo $summaryData['reviews_count']; ?></span>
<span itemprop="bestRating">100</span>
<span itemprop="worstRating">0</span>
</span>
<?php endif; ?>
<?php endif; ?>

<?php echo $this->getReviewsSummaryHtml($_product, false, true)?>
<?php if ($_product->getShortDescription()):?>
<div class="short-description">
<h2><?php echo $this->__('Quick Overview') ?></h2>
<div class="std" <?php if($enabled_richsnippets): ?>itemprop="description"<?php endif; ?>><?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?></div>
</div>
<?php endif;?>
<div class="product-info">
<div <?php if($enabled_richsnippets) echo $helper_richsnippets->getOfferItemscope(); ?>>
<?php echo $this->getChildHtml('product_type_data'); ?>
<?php echo $this->getTierPriceHtml(); ?>
<?php echo $price_properties; ?>
</div>
<?php echo $this->getChildHtml('extrahint') ?>
<?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; ?>
<?php if($sku = $_product->getSku()): ?>
<?php if($enabled_richsnippets): ?><meta itemprop="productID" content="sku:<?php echo $sku; ?>" /><?php endif; ?>
<?php endif; ?>
<?php echo $this->getChildHtml('alert_urls') ?>
<?php echo $this->getChildHtml('other');?>
</div>
<?php if (!$this->hasOptions()):?>
<div class="clearer"></div>
<div class="add-to-box">
<?php if($_product->isSaleable()): ?>
<?php echo $this->getChildHtml('addtocart') ?>
<?php if( $this->helper('wishlist')->isAllow() || $_compareUrl=$this->helper('catalog/product_compare')->getAddUrl($_product)): ?>
<?php endif; ?>
<?php endif; ?>
<?php echo $this->getChildHtml('addto') ?>
</div>
<?php echo $this->getChildHtml('extra_buttons') ?>
<?php elseif (!$_product->isSaleable()): ?>
<div class="clearer"></div>
<div class="add-to-box">
<?php echo $this->getChildHtml('addto') ?>
</div>
<?php endif; ?>

<?php if ($_product->isSaleable() && $this->hasOptions()):?>
<?php echo $this->getChildChildHtml('container1', '', true, true) ?>
<?php endif;?>
<div class="clearer"></div>
<?php echo $this->getChildHtml('addthis_sharetool'); ?>
</div>

</div>
<?php if ($_product->isSaleable() && $this->hasOptions()):?>
<?php echo $this->getChildChildHtml('container2', '', true, true) ?>
<?php endif;?>
</form>
<?php if(Mage::getStoreConfig('ajaxcart/addtocart/enableproduct') && (Mage::app()->getFrontController()->getRequest()->getModuleName() == "catalog") || (Mage::app()->getFrontController()->getRequest()->getModuleName() == "quickview")): ?>
<script type="text/javascript">
//<![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;
if (!url) {
url = jQuery('#product_addtocart_form').attr('action');
}
if(url.indexOf("wishlist/index/cart") != -1){
url = url.replace("wishlist/index/cart","ajaxcart/index/add"); // New Code
} else {
url = url.replace("checkout/cart","ajaxcart/index"); // New Code
}
url = url.replace("http://", "//");
url = url.replace("https://", "//");
var data = jQuery('#product_addtocart_form').serialize();
data += '&isAjax=1';
var is_quickview = false;
if(jQuery("body").hasClass("quickview-index-view")){
is_quickview = true;
}
if(is_quickview)
window.parent.jQuery("#loading-mask").show();
else
jQuery('#loading-mask').show();
try {
jQuery.ajax({
url : url,
dataType : 'json',
type : 'post',
data : data,
success : function(data) {
if(is_quickview)
window.parent.jQuery('#loading-mask').hide();
else
jQuery('#loading-mask').hide();
if(data.status == 'ERROR'){
if(is_quickview)
window.parent.alert(data.message.replace("<br/>",""));
else
alert(data.message.replace("<br/>",""));
}else{
if(is_quickview){
if(window.parent.jQuery('.header-container .mini-cart')){
window.parent.jQuery('.header-container .mini-cart').replaceWith(data.toplink);
}
if(window.parent.jQuery('.fixed-header .mini-cart')){
window.parent.jQuery('.fixed-header .mini-cart').replaceWith(data.toplink);
}
if(window.parent.jQuery('.sticky-header .mini-cart')){
window.parent.jQuery('.sticky-header .mini-cart').replaceWith(data.toplink);
}
if(window.parent.jQuery('.col-right .block.block-cart')){
window.parent.jQuery('.col-right .block.block-cart').replaceWith(data.cart_sidebar);
}
window.parent.jQuery('#after-loading-success-message #success-message-container .msg-box').html(data.message);
<?php $autoclose = Mage::getStoreConfig('ajaxcart/addtocart/autoclose', $code);?>
ajaxcart_sec = <?php echo ($autoclose && is_numeric($autoclose))?$autoclose:5; ?>;
timer_sec = ajaxcart_sec;
window.parent.jQuery('#after-loading-success-message').fadeIn(200);
ajaxcart_timer = setInterval(function(){
timer_sec --;
window.parent.jQuery('#after-loading-success-message .timer').html(timer_sec);
},1000)
setTimeout(function(){
window.parent.jQuery('#after-loading-success-message').fadeOut(200);
clearTimeout(ajaxcart_timer);
setTimeout(function(){
window.parent.jQuery('#after-loading-success-message .timer').html(ajaxcart_sec);
}, 1000);
},ajaxcart_sec*1000);
}
else {
if(jQuery('.header-container .mini-cart')){
jQuery('.header-container .mini-cart').replaceWith(data.toplink);
}
if(jQuery('.fixed-header .mini-cart')){
jQuery('.fixed-header .mini-cart').replaceWith(data.toplink);
}
if(jQuery('.sticky-header .mini-cart')){
jQuery('.sticky-header .mini-cart').replaceWith(data.toplink);
}
if(jQuery('.col-right .block.block-cart')){
jQuery('.col-right .block.block-cart').replaceWith(data.cart_sidebar);
}
jQuery('#after-loading-success-message #success-message-container .msg-box').html(data.message);
<?php $autoclose = Mage::getStoreConfig('ajaxcart/addtocart/autoclose', $code);?>
ajaxcart_sec = <?php echo ($autoclose && is_numeric($autoclose))?$autoclose:5; ?>;
timer_sec = ajaxcart_sec;
jQuery('#after-loading-success-message').fadeIn(200);
ajaxcart_timer = setInterval(function(){
timer_sec --;
jQuery('#after-loading-success-message .timer').html(timer_sec);
},1000)
setTimeout(function(){
jQuery('#after-loading-success-message').fadeOut(200);
clearTimeout(ajaxcart_timer);
setTimeout(function(){
jQuery('#after-loading-success-message .timer').html(ajaxcart_sec);
}, 1000);
},ajaxcart_sec*1000);
}
}
}
});
} catch (e) {
}
this.form.action = oldUrl;
if (e) {
throw e;
}
} else {
if(jQuery('#product-options-wrapper'))
jQuery('#product-options-wrapper').scrollToMe();
}
}.bind(productAddToCartForm);
//]]>
</script>
<?php else : ?>
<script type="text/javascript">
//<![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;
}
} else {
if(jQuery('#product-options-wrapper'))
jQuery('#product-options-wrapper').scrollToMe();
}
}.bind(productAddToCartForm);
//]]>
</script>
<?php endif; ?>
<script type="text/javascript">
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);
} else {
if(jQuery('#product-options-wrapper'))
jQuery('#product-options-wrapper').scrollToMe();
}
}.bind(productAddToCartForm);
</script>
</div>

<div class="product-collateral">
<?php echo $this->getChildHtml('product_additional_data'); ?>
</div>
<?php echo $this->getChildHtml('upsell_products'); ?>
</div>
<script type="text/javascript">
jQuery(function($){
$("body.quickview-index-view .no-rating a, body.quickview-index-view .ratings a").off('click').on("click",function(e){
window.parent.location.href = $(this).attr("href");
window.parent.jQuery.fancybox.close();
});
<?php
if($enable_addtocart_sticky){
?>
p_scrolled = false;
$(window).scroll(function(){
if(400<$(window).scrollTop() && !p_scrolled){
$('.sticky-product').removeClass("hide");
p_scrolled = true;
}
if(400>=$(window).scrollTop() && p_scrolled){
$('.sticky-product').addClass("hide");
p_scrolled = false;
}
});
<?php
}
?>
<?php
if($move_product_tab){
?>
$(".product-info").before($(".product-tabs"));
<?php
}
?>
});
</script>


enter image description here










share|improve this question
















especially magento geeks, I need a lil help. how can I move in stock, price, color switcher & add to cart option above description, tags & custom tap?
enter image description here



    <?php
$_helper = $this->helper('catalog/output');
$helper_richsnippets = $this->helper('porto/richsnippets');
$store = Mage::app()->getStore();
$code = $store->getCode();
?>
<?php $_product = $this->getProduct(); ?>
<?php
$product = Mage::getModel('catalog/product')->load($_product->getId());
$product_type = $_product->getTypeId();
$enabled_richsnippets = ($helper_richsnippets->isEnabled() && $product_type !== "grouped");
$price_properties = "";

if($enabled_richsnippets){
$price_properties = $helper_richsnippets->getPriceProperties($_product);
}

$enable_addtocart_sticky = Mage::getStoreConfig("porto_settings/product_view/enable_addtocart_sticky",$code);
$move_product_tab = Mage::getStoreConfig("porto_settings/product_view/move_product_tab",$code);
$sticky_header = "";
if(!Mage::getStoreConfig("porto_settings/header/sticky_header", $code))
$sticky_header = "no-sticky-header";
?>
<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 <?php if($move_product_tab): ?>moved-tab<?php endif;?>" <?php if($enabled_richsnippets): ?><?php echo $helper_richsnippets->getProductItemscope(); ?><?php endif; ?>>
<div class="product-essential">
<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>
<?php
if($enable_addtocart_sticky){
?>
<div class="sticky-product hide <?php echo $sticky_header; ?>">
<div class="container">
<?php
$aspect_ratio = Mage::getStoreConfig("porto_settings/product_view/aspect_ratio", $code);
$ratio_width = 600;
$ratio_height = 600;
if(Mage::getStoreConfig("porto_settings/product_view/ratio_width", $code))
$ratio_width = Mage::getStoreConfig("porto_settings/product_view/ratio_width", $code);
if(!$aspect_ratio){
if(Mage::getStoreConfig("porto_settings/product_view/ratio_height", $code))
$ratio_height = Mage::getStoreConfig("porto_settings/product_view/ratio_height", $code);
}
$ratio = $ratio_height / $ratio_width;
$ratio_width = 50;
$ratio_height = $ratio_width * $ratio;
?>
<div class="sticky-image">
<img src="<?php if($aspect_ratio):?><?php echo $this->helper('catalog/image')->init($_product, 'small_image')->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize(50);?><?php else: ?><?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize($ratio_width,$ratio_height); ?><?php endif; ?>" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>"/>
</div>
<div class="sticky-detail">
<div class="product-name-area">
<h2 class="product-name"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></h2>
<?php echo $this->getPriceHtml($_product, false, '_clone') ?>
</div>
<?php
if (Mage::helper('catalog')->isModuleEnabled('Mage_Review')):
?>
<?php
$review_html = $this->getReviewsSummaryHtml($product, 'short');
if($review_html){
echo $review_html;
}else{
?>
<div class="ratings">
<div class="rating-box">
<div class="rating" style="width:0"></div>
</div>
</div>
<?php
}
?>
<?php else: ?>
<div class="ratings">
<div class="rating-box">
<div class="rating" style="width:0"></div>
</div>
</div>
<?php endif; ?>
<?php if($enabled_richsnippets): ?>
<?php if ($this->getReviewsCount()): ?>
<span itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
<meta itemprop="ratingValue" content="<?php echo $this->getRatingSummary(); ?>"/>
<meta itemprop="reviewCount" content="<?php echo $this->getReviewsCount(); ?>" />
<meta itemprop="bestRating" content="100"/>
<meta itemprop="worstRating" content="0"/>
</span>
<?php endif; ?>
<?php endif; ?>
<?php if ($_product->isAvailable()): ?>
<p class="availability in-stock"><span>(<?php echo $this->__('In stock') ?>)</span></p>
<?php else: ?>
<p class="availability out-of-stock"><span>(<?php echo $this->__('Out of stock') ?>)</span></p>
<?php endif; ?>
</div>
<?php if($_product->isSaleable()): ?>
<?php $buttonTitle = $this->__('Add to Cart'); ?>
<div class="add-to-cart">
<button type="button" title="<?php echo $buttonTitle ?>" class="button btn-cart" onclick="productAddToCartForm.submit(this)"><span><span><i class="icon-cart"></i><?php echo $buttonTitle ?></span></span></button>
</div>
<?php endif; ?>
</div>
</div>
<?php
}
?>
<div class="row">
<div class="product-img-box col-sm-<?php echo Mage::getStoreConfig("porto_settings/product_view/product_image_size", $code); ?> <?php echo Mage::getStoreConfig("porto_settings/product_view/thumbnail_image_type", $code); ?>">
<?php echo $this->getChildHtml('media') ?>
</div>
<div class="product-shop col-sm-<?php echo 12-Mage::getStoreConfig("porto_settings/product_view/product_image_size", $code); ?>">
<?php
if (Mage::getStoreConfig("porto_settings/product_view/prev_next",$code)){
?>
<div class="prev-next-products">
<?php $_prev = Mage::helper('porto')->getPreviousProduct(); ?>
<?php $_next = Mage::helper('porto')->getNextProduct(); ?>

<?php if($_prev): ?>
<div class="product-nav product-prev">
<a href="<?php echo $_prev->getProductUrl();?>" title="<?php echo $this->__("Previous Product"); ?>">
<?php echo Mage::getStoreConfig("porto_settings/product_view/prev_text",$code); ?>
</a>
<div class="product-pop theme-border-color">
<?php
$image_src = $this->helper('catalog/image')->init($_prev, 'image')->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize(80);
?>
<img class="product-image" src="<?php echo $image_src; ?>" alt="<?php echo $this->__('Previous');?>"/>
<h3 class="product-name"><?php echo $_helper->productAttribute($_prev, $_prev->getName(), 'name') ?></h3>
</div>
</div>
<?php endif; ?>
<?php if($_next): ?>
<div class="product-nav product-next">
<a class="product-next" href="<?php echo $_next->getProductUrl();?>" title="<?php echo $this->__("Next Product"); ?>"><?php echo Mage::getStoreConfig("porto_settings/product_view/next_text",$code); ?></a>
<div class="product-pop theme-border-color">
<?php
$image_src = $this->helper('catalog/image')->init($_next, 'image')->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize(80);
?>
<img class="product-image" src="<?php echo $image_src; ?>" alt="<?php echo $this->__('Previous');?>"/>
<h3 class="product-name"><?php echo $_helper->productAttribute($_next, $_next->getName(), 'name') ?></h3>
</div>
</div>
<?php endif; ?>
</div>
<?php
}
?>
<div class="product-name">
<h1 <?php if($enabled_richsnippets): ?>itemprop="name"<?php endif; ?>><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></h1>
</div>
<?php if($enabled_richsnippets): ?>
<?php
$storeId = Mage::app()->getStore()->getId();
$summaryData = Mage::getModel('review/review_summary')->setStoreId($storeId)->load($_product->getId());
?>
<?php if ($summaryData['reviews_count']): ?>
<span itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating" class="no-display">
<span itemprop="ratingValue"><?php echo $summaryData['rating_summary']; ?></span>
<span itemprop="reviewCount"><?php echo $summaryData['reviews_count']; ?></span>
<span itemprop="bestRating">100</span>
<span itemprop="worstRating">0</span>
</span>
<?php endif; ?>
<?php endif; ?>

<?php echo $this->getReviewsSummaryHtml($_product, false, true)?>
<?php if ($_product->getShortDescription()):?>
<div class="short-description">
<h2><?php echo $this->__('Quick Overview') ?></h2>
<div class="std" <?php if($enabled_richsnippets): ?>itemprop="description"<?php endif; ?>><?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?></div>
</div>
<?php endif;?>
<div class="product-info">
<div <?php if($enabled_richsnippets) echo $helper_richsnippets->getOfferItemscope(); ?>>
<?php echo $this->getChildHtml('product_type_data'); ?>
<?php echo $this->getTierPriceHtml(); ?>
<?php echo $price_properties; ?>
</div>
<?php echo $this->getChildHtml('extrahint') ?>
<?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; ?>
<?php if($sku = $_product->getSku()): ?>
<?php if($enabled_richsnippets): ?><meta itemprop="productID" content="sku:<?php echo $sku; ?>" /><?php endif; ?>
<?php endif; ?>
<?php echo $this->getChildHtml('alert_urls') ?>
<?php echo $this->getChildHtml('other');?>
</div>
<?php if (!$this->hasOptions()):?>
<div class="clearer"></div>
<div class="add-to-box">
<?php if($_product->isSaleable()): ?>
<?php echo $this->getChildHtml('addtocart') ?>
<?php if( $this->helper('wishlist')->isAllow() || $_compareUrl=$this->helper('catalog/product_compare')->getAddUrl($_product)): ?>
<?php endif; ?>
<?php endif; ?>
<?php echo $this->getChildHtml('addto') ?>
</div>
<?php echo $this->getChildHtml('extra_buttons') ?>
<?php elseif (!$_product->isSaleable()): ?>
<div class="clearer"></div>
<div class="add-to-box">
<?php echo $this->getChildHtml('addto') ?>
</div>
<?php endif; ?>

<?php if ($_product->isSaleable() && $this->hasOptions()):?>
<?php echo $this->getChildChildHtml('container1', '', true, true) ?>
<?php endif;?>
<div class="clearer"></div>
<?php echo $this->getChildHtml('addthis_sharetool'); ?>
</div>

</div>
<?php if ($_product->isSaleable() && $this->hasOptions()):?>
<?php echo $this->getChildChildHtml('container2', '', true, true) ?>
<?php endif;?>
</form>
<?php if(Mage::getStoreConfig('ajaxcart/addtocart/enableproduct') && (Mage::app()->getFrontController()->getRequest()->getModuleName() == "catalog") || (Mage::app()->getFrontController()->getRequest()->getModuleName() == "quickview")): ?>
<script type="text/javascript">
//<![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;
if (!url) {
url = jQuery('#product_addtocart_form').attr('action');
}
if(url.indexOf("wishlist/index/cart") != -1){
url = url.replace("wishlist/index/cart","ajaxcart/index/add"); // New Code
} else {
url = url.replace("checkout/cart","ajaxcart/index"); // New Code
}
url = url.replace("http://", "//");
url = url.replace("https://", "//");
var data = jQuery('#product_addtocart_form').serialize();
data += '&isAjax=1';
var is_quickview = false;
if(jQuery("body").hasClass("quickview-index-view")){
is_quickview = true;
}
if(is_quickview)
window.parent.jQuery("#loading-mask").show();
else
jQuery('#loading-mask').show();
try {
jQuery.ajax({
url : url,
dataType : 'json',
type : 'post',
data : data,
success : function(data) {
if(is_quickview)
window.parent.jQuery('#loading-mask').hide();
else
jQuery('#loading-mask').hide();
if(data.status == 'ERROR'){
if(is_quickview)
window.parent.alert(data.message.replace("<br/>",""));
else
alert(data.message.replace("<br/>",""));
}else{
if(is_quickview){
if(window.parent.jQuery('.header-container .mini-cart')){
window.parent.jQuery('.header-container .mini-cart').replaceWith(data.toplink);
}
if(window.parent.jQuery('.fixed-header .mini-cart')){
window.parent.jQuery('.fixed-header .mini-cart').replaceWith(data.toplink);
}
if(window.parent.jQuery('.sticky-header .mini-cart')){
window.parent.jQuery('.sticky-header .mini-cart').replaceWith(data.toplink);
}
if(window.parent.jQuery('.col-right .block.block-cart')){
window.parent.jQuery('.col-right .block.block-cart').replaceWith(data.cart_sidebar);
}
window.parent.jQuery('#after-loading-success-message #success-message-container .msg-box').html(data.message);
<?php $autoclose = Mage::getStoreConfig('ajaxcart/addtocart/autoclose', $code);?>
ajaxcart_sec = <?php echo ($autoclose && is_numeric($autoclose))?$autoclose:5; ?>;
timer_sec = ajaxcart_sec;
window.parent.jQuery('#after-loading-success-message').fadeIn(200);
ajaxcart_timer = setInterval(function(){
timer_sec --;
window.parent.jQuery('#after-loading-success-message .timer').html(timer_sec);
},1000)
setTimeout(function(){
window.parent.jQuery('#after-loading-success-message').fadeOut(200);
clearTimeout(ajaxcart_timer);
setTimeout(function(){
window.parent.jQuery('#after-loading-success-message .timer').html(ajaxcart_sec);
}, 1000);
},ajaxcart_sec*1000);
}
else {
if(jQuery('.header-container .mini-cart')){
jQuery('.header-container .mini-cart').replaceWith(data.toplink);
}
if(jQuery('.fixed-header .mini-cart')){
jQuery('.fixed-header .mini-cart').replaceWith(data.toplink);
}
if(jQuery('.sticky-header .mini-cart')){
jQuery('.sticky-header .mini-cart').replaceWith(data.toplink);
}
if(jQuery('.col-right .block.block-cart')){
jQuery('.col-right .block.block-cart').replaceWith(data.cart_sidebar);
}
jQuery('#after-loading-success-message #success-message-container .msg-box').html(data.message);
<?php $autoclose = Mage::getStoreConfig('ajaxcart/addtocart/autoclose', $code);?>
ajaxcart_sec = <?php echo ($autoclose && is_numeric($autoclose))?$autoclose:5; ?>;
timer_sec = ajaxcart_sec;
jQuery('#after-loading-success-message').fadeIn(200);
ajaxcart_timer = setInterval(function(){
timer_sec --;
jQuery('#after-loading-success-message .timer').html(timer_sec);
},1000)
setTimeout(function(){
jQuery('#after-loading-success-message').fadeOut(200);
clearTimeout(ajaxcart_timer);
setTimeout(function(){
jQuery('#after-loading-success-message .timer').html(ajaxcart_sec);
}, 1000);
},ajaxcart_sec*1000);
}
}
}
});
} catch (e) {
}
this.form.action = oldUrl;
if (e) {
throw e;
}
} else {
if(jQuery('#product-options-wrapper'))
jQuery('#product-options-wrapper').scrollToMe();
}
}.bind(productAddToCartForm);
//]]>
</script>
<?php else : ?>
<script type="text/javascript">
//<![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;
}
} else {
if(jQuery('#product-options-wrapper'))
jQuery('#product-options-wrapper').scrollToMe();
}
}.bind(productAddToCartForm);
//]]>
</script>
<?php endif; ?>
<script type="text/javascript">
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);
} else {
if(jQuery('#product-options-wrapper'))
jQuery('#product-options-wrapper').scrollToMe();
}
}.bind(productAddToCartForm);
</script>
</div>

<div class="product-collateral">
<?php echo $this->getChildHtml('product_additional_data'); ?>
</div>
<?php echo $this->getChildHtml('upsell_products'); ?>
</div>
<script type="text/javascript">
jQuery(function($){
$("body.quickview-index-view .no-rating a, body.quickview-index-view .ratings a").off('click').on("click",function(e){
window.parent.location.href = $(this).attr("href");
window.parent.jQuery.fancybox.close();
});
<?php
if($enable_addtocart_sticky){
?>
p_scrolled = false;
$(window).scroll(function(){
if(400<$(window).scrollTop() && !p_scrolled){
$('.sticky-product').removeClass("hide");
p_scrolled = true;
}
if(400>=$(window).scrollTop() && p_scrolled){
$('.sticky-product').addClass("hide");
p_scrolled = false;
}
});
<?php
}
?>
<?php
if($move_product_tab){
?>
$(".product-info").before($(".product-tabs"));
<?php
}
?>
});
</script>


enter image description here







custom-options css product-view product-page page-layouts






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 6 '16 at 23:24







Shah Ahmad Shaheer

















asked Jul 5 '16 at 22:24









Shah Ahmad ShaheerShah Ahmad Shaheer

13




13





bumped to the homepage by Community 3 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 3 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • It would be better to include the code of that file in question. Most people would not be comfortable to follow a link that downloads a '.rar' file. It will also work in case link goes dead in future.

    – Prateek
    Jul 6 '16 at 8:28



















  • It would be better to include the code of that file in question. Most people would not be comfortable to follow a link that downloads a '.rar' file. It will also work in case link goes dead in future.

    – Prateek
    Jul 6 '16 at 8:28

















It would be better to include the code of that file in question. Most people would not be comfortable to follow a link that downloads a '.rar' file. It will also work in case link goes dead in future.

– Prateek
Jul 6 '16 at 8:28





It would be better to include the code of that file in question. Most people would not be comfortable to follow a link that downloads a '.rar' file. It will also work in case link goes dead in future.

– Prateek
Jul 6 '16 at 8:28










3 Answers
3






active

oldest

votes


















0














I believe you are using custom theme. Without looking at your view.phtml file it will be hard to tell what to move, but I will give it a try.



If you go to your [your_theme]/template/catalog/product/view.phtml file you will find something similar to this:



<div class="product-collateral toggle-content tabs">
<?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>


This is copied from rwd theme.



You can move this whole thing below the add to cart and additional option block.






share|improve this answer
























  • please check the post update

    – Shah Ahmad Shaheer
    Jul 5 '16 at 23:47











  • can you paste whole code in qst plez.

    – Adarsh Khatri
    Jul 5 '16 at 23:49



















0














In the code which you have provided, in place of short description it is showing those tabs inside div class='short-description'. And there is one div class='product-info'. So just move div with class='product-info' above the short-description div.



I think this will help you.






share|improve this answer































    0














    Try moving lines 197 through 219 (seen here):



    <?php if (!$this->hasOptions()):?>
    <div class="clearer"></div>
    <div class="add-to-box">
    <?php if($_product->isSaleable()): ?>
    <?php echo $this->getChildHtml('addtocart') ?>
    <?php if( $this->helper('wishlist')->isAllow() || $_compareUrl=$this->helper('catalog/product_compare')->getAddUrl($_product)): ?>
    <?php endif; ?>
    <?php endif; ?>
    <?php echo $this->getChildHtml('addto') ?>
    </div>
    <?php echo $this->getChildHtml('extra_buttons') ?>
    <?php elseif (!$_product->isSaleable()): ?>
    <div class="clearer"></div>
    <div class="add-to-box">
    <?php echo $this->getChildHtml('addto') ?>
    </div>
    <?php endif; ?>

    <?php if ($_product->isSaleable() && $this->hasOptions()):?>
    <?php echo $this->getChildChildHtml('container1', '', true, true) ?>
    <?php endif;?>
    <div class="clearer"></div>
    <?php echo $this->getChildHtml('addthis_sharetool'); ?>


    To just before the current snippet of 181 through 186 (seen here):



    <div class="product-info">
    <div <?php if($enabled_richsnippets) echo $helper_richsnippets->getOfferItemscope(); ?>>
    <?php echo $this->getChildHtml('product_type_data'); ?>
    <?php echo $this->getTierPriceHtml(); ?>
    <?php echo $price_properties; ?>
    </div>


    So new version of lines 181 through 208 will be:



                    <?php if (!$this->hasOptions()):?>
    <div class="clearer"></div>
    <div class="add-to-box">
    <?php if($_product->isSaleable()): ?>
    <?php echo $this->getChildHtml('addtocart') ?>
    <?php if( $this->helper('wishlist')->isAllow() || $_compareUrl=$this->helper('catalog/product_compare')->getAddUrl($_product)): ?>
    <?php endif; ?>
    <?php endif; ?>
    <?php echo $this->getChildHtml('addto') ?>
    </div>
    <?php echo $this->getChildHtml('extra_buttons') ?>
    <?php elseif (!$_product->isSaleable()): ?>
    <div class="clearer"></div>
    <div class="add-to-box">
    <?php echo $this->getChildHtml('addto') ?>
    </div>
    <?php endif; ?>
    <?php if ($_product->isSaleable() && $this->hasOptions()):?>
    <?php echo $this->getChildChildHtml('container1', '', true, true) ?>
    <?php endif;?>
    <div class="clearer"></div>
    <?php echo $this->getChildHtml('addthis_sharetool'); ?>
    <div class="product-info">
    <div <?php if($enabled_richsnippets) echo $helper_richsnippets->getOfferItemscope(); ?>>
    <?php echo $this->getChildHtml('product_type_data'); ?>
    <?php echo $this->getTierPriceHtml(); ?>
    <?php echo $price_properties; ?>
    </div>





    share|improve this answer
























    • it did most of the trick but product price and stock is in buttom now and one of the tab is missing, can you please help me out with this! it would really appreciate it!

      – Shah Ahmad Shaheer
      Jul 6 '16 at 23:28













    • anyone??????????

      – Shah Ahmad Shaheer
      Jul 8 '16 at 9:22











    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "479"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f124374%2fmagento-1-9x-layout-setting-single-product-page%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    I believe you are using custom theme. Without looking at your view.phtml file it will be hard to tell what to move, but I will give it a try.



    If you go to your [your_theme]/template/catalog/product/view.phtml file you will find something similar to this:



    <div class="product-collateral toggle-content tabs">
    <?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>


    This is copied from rwd theme.



    You can move this whole thing below the add to cart and additional option block.






    share|improve this answer
























    • please check the post update

      – Shah Ahmad Shaheer
      Jul 5 '16 at 23:47











    • can you paste whole code in qst plez.

      – Adarsh Khatri
      Jul 5 '16 at 23:49
















    0














    I believe you are using custom theme. Without looking at your view.phtml file it will be hard to tell what to move, but I will give it a try.



    If you go to your [your_theme]/template/catalog/product/view.phtml file you will find something similar to this:



    <div class="product-collateral toggle-content tabs">
    <?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>


    This is copied from rwd theme.



    You can move this whole thing below the add to cart and additional option block.






    share|improve this answer
























    • please check the post update

      – Shah Ahmad Shaheer
      Jul 5 '16 at 23:47











    • can you paste whole code in qst plez.

      – Adarsh Khatri
      Jul 5 '16 at 23:49














    0












    0








    0







    I believe you are using custom theme. Without looking at your view.phtml file it will be hard to tell what to move, but I will give it a try.



    If you go to your [your_theme]/template/catalog/product/view.phtml file you will find something similar to this:



    <div class="product-collateral toggle-content tabs">
    <?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>


    This is copied from rwd theme.



    You can move this whole thing below the add to cart and additional option block.






    share|improve this answer













    I believe you are using custom theme. Without looking at your view.phtml file it will be hard to tell what to move, but I will give it a try.



    If you go to your [your_theme]/template/catalog/product/view.phtml file you will find something similar to this:



    <div class="product-collateral toggle-content tabs">
    <?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>


    This is copied from rwd theme.



    You can move this whole thing below the add to cart and additional option block.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Jul 5 '16 at 23:24









    Adarsh KhatriAdarsh Khatri

    6,70811644




    6,70811644













    • please check the post update

      – Shah Ahmad Shaheer
      Jul 5 '16 at 23:47











    • can you paste whole code in qst plez.

      – Adarsh Khatri
      Jul 5 '16 at 23:49



















    • please check the post update

      – Shah Ahmad Shaheer
      Jul 5 '16 at 23:47











    • can you paste whole code in qst plez.

      – Adarsh Khatri
      Jul 5 '16 at 23:49

















    please check the post update

    – Shah Ahmad Shaheer
    Jul 5 '16 at 23:47





    please check the post update

    – Shah Ahmad Shaheer
    Jul 5 '16 at 23:47













    can you paste whole code in qst plez.

    – Adarsh Khatri
    Jul 5 '16 at 23:49





    can you paste whole code in qst plez.

    – Adarsh Khatri
    Jul 5 '16 at 23:49













    0














    In the code which you have provided, in place of short description it is showing those tabs inside div class='short-description'. And there is one div class='product-info'. So just move div with class='product-info' above the short-description div.



    I think this will help you.






    share|improve this answer




























      0














      In the code which you have provided, in place of short description it is showing those tabs inside div class='short-description'. And there is one div class='product-info'. So just move div with class='product-info' above the short-description div.



      I think this will help you.






      share|improve this answer


























        0












        0








        0







        In the code which you have provided, in place of short description it is showing those tabs inside div class='short-description'. And there is one div class='product-info'. So just move div with class='product-info' above the short-description div.



        I think this will help you.






        share|improve this answer













        In the code which you have provided, in place of short description it is showing those tabs inside div class='short-description'. And there is one div class='product-info'. So just move div with class='product-info' above the short-description div.



        I think this will help you.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jul 6 '16 at 16:54









        Gaurav AgrawalGaurav Agrawal

        1




        1























            0














            Try moving lines 197 through 219 (seen here):



            <?php if (!$this->hasOptions()):?>
            <div class="clearer"></div>
            <div class="add-to-box">
            <?php if($_product->isSaleable()): ?>
            <?php echo $this->getChildHtml('addtocart') ?>
            <?php if( $this->helper('wishlist')->isAllow() || $_compareUrl=$this->helper('catalog/product_compare')->getAddUrl($_product)): ?>
            <?php endif; ?>
            <?php endif; ?>
            <?php echo $this->getChildHtml('addto') ?>
            </div>
            <?php echo $this->getChildHtml('extra_buttons') ?>
            <?php elseif (!$_product->isSaleable()): ?>
            <div class="clearer"></div>
            <div class="add-to-box">
            <?php echo $this->getChildHtml('addto') ?>
            </div>
            <?php endif; ?>

            <?php if ($_product->isSaleable() && $this->hasOptions()):?>
            <?php echo $this->getChildChildHtml('container1', '', true, true) ?>
            <?php endif;?>
            <div class="clearer"></div>
            <?php echo $this->getChildHtml('addthis_sharetool'); ?>


            To just before the current snippet of 181 through 186 (seen here):



            <div class="product-info">
            <div <?php if($enabled_richsnippets) echo $helper_richsnippets->getOfferItemscope(); ?>>
            <?php echo $this->getChildHtml('product_type_data'); ?>
            <?php echo $this->getTierPriceHtml(); ?>
            <?php echo $price_properties; ?>
            </div>


            So new version of lines 181 through 208 will be:



                            <?php if (!$this->hasOptions()):?>
            <div class="clearer"></div>
            <div class="add-to-box">
            <?php if($_product->isSaleable()): ?>
            <?php echo $this->getChildHtml('addtocart') ?>
            <?php if( $this->helper('wishlist')->isAllow() || $_compareUrl=$this->helper('catalog/product_compare')->getAddUrl($_product)): ?>
            <?php endif; ?>
            <?php endif; ?>
            <?php echo $this->getChildHtml('addto') ?>
            </div>
            <?php echo $this->getChildHtml('extra_buttons') ?>
            <?php elseif (!$_product->isSaleable()): ?>
            <div class="clearer"></div>
            <div class="add-to-box">
            <?php echo $this->getChildHtml('addto') ?>
            </div>
            <?php endif; ?>
            <?php if ($_product->isSaleable() && $this->hasOptions()):?>
            <?php echo $this->getChildChildHtml('container1', '', true, true) ?>
            <?php endif;?>
            <div class="clearer"></div>
            <?php echo $this->getChildHtml('addthis_sharetool'); ?>
            <div class="product-info">
            <div <?php if($enabled_richsnippets) echo $helper_richsnippets->getOfferItemscope(); ?>>
            <?php echo $this->getChildHtml('product_type_data'); ?>
            <?php echo $this->getTierPriceHtml(); ?>
            <?php echo $price_properties; ?>
            </div>





            share|improve this answer
























            • it did most of the trick but product price and stock is in buttom now and one of the tab is missing, can you please help me out with this! it would really appreciate it!

              – Shah Ahmad Shaheer
              Jul 6 '16 at 23:28













            • anyone??????????

              – Shah Ahmad Shaheer
              Jul 8 '16 at 9:22
















            0














            Try moving lines 197 through 219 (seen here):



            <?php if (!$this->hasOptions()):?>
            <div class="clearer"></div>
            <div class="add-to-box">
            <?php if($_product->isSaleable()): ?>
            <?php echo $this->getChildHtml('addtocart') ?>
            <?php if( $this->helper('wishlist')->isAllow() || $_compareUrl=$this->helper('catalog/product_compare')->getAddUrl($_product)): ?>
            <?php endif; ?>
            <?php endif; ?>
            <?php echo $this->getChildHtml('addto') ?>
            </div>
            <?php echo $this->getChildHtml('extra_buttons') ?>
            <?php elseif (!$_product->isSaleable()): ?>
            <div class="clearer"></div>
            <div class="add-to-box">
            <?php echo $this->getChildHtml('addto') ?>
            </div>
            <?php endif; ?>

            <?php if ($_product->isSaleable() && $this->hasOptions()):?>
            <?php echo $this->getChildChildHtml('container1', '', true, true) ?>
            <?php endif;?>
            <div class="clearer"></div>
            <?php echo $this->getChildHtml('addthis_sharetool'); ?>


            To just before the current snippet of 181 through 186 (seen here):



            <div class="product-info">
            <div <?php if($enabled_richsnippets) echo $helper_richsnippets->getOfferItemscope(); ?>>
            <?php echo $this->getChildHtml('product_type_data'); ?>
            <?php echo $this->getTierPriceHtml(); ?>
            <?php echo $price_properties; ?>
            </div>


            So new version of lines 181 through 208 will be:



                            <?php if (!$this->hasOptions()):?>
            <div class="clearer"></div>
            <div class="add-to-box">
            <?php if($_product->isSaleable()): ?>
            <?php echo $this->getChildHtml('addtocart') ?>
            <?php if( $this->helper('wishlist')->isAllow() || $_compareUrl=$this->helper('catalog/product_compare')->getAddUrl($_product)): ?>
            <?php endif; ?>
            <?php endif; ?>
            <?php echo $this->getChildHtml('addto') ?>
            </div>
            <?php echo $this->getChildHtml('extra_buttons') ?>
            <?php elseif (!$_product->isSaleable()): ?>
            <div class="clearer"></div>
            <div class="add-to-box">
            <?php echo $this->getChildHtml('addto') ?>
            </div>
            <?php endif; ?>
            <?php if ($_product->isSaleable() && $this->hasOptions()):?>
            <?php echo $this->getChildChildHtml('container1', '', true, true) ?>
            <?php endif;?>
            <div class="clearer"></div>
            <?php echo $this->getChildHtml('addthis_sharetool'); ?>
            <div class="product-info">
            <div <?php if($enabled_richsnippets) echo $helper_richsnippets->getOfferItemscope(); ?>>
            <?php echo $this->getChildHtml('product_type_data'); ?>
            <?php echo $this->getTierPriceHtml(); ?>
            <?php echo $price_properties; ?>
            </div>





            share|improve this answer
























            • it did most of the trick but product price and stock is in buttom now and one of the tab is missing, can you please help me out with this! it would really appreciate it!

              – Shah Ahmad Shaheer
              Jul 6 '16 at 23:28













            • anyone??????????

              – Shah Ahmad Shaheer
              Jul 8 '16 at 9:22














            0












            0








            0







            Try moving lines 197 through 219 (seen here):



            <?php if (!$this->hasOptions()):?>
            <div class="clearer"></div>
            <div class="add-to-box">
            <?php if($_product->isSaleable()): ?>
            <?php echo $this->getChildHtml('addtocart') ?>
            <?php if( $this->helper('wishlist')->isAllow() || $_compareUrl=$this->helper('catalog/product_compare')->getAddUrl($_product)): ?>
            <?php endif; ?>
            <?php endif; ?>
            <?php echo $this->getChildHtml('addto') ?>
            </div>
            <?php echo $this->getChildHtml('extra_buttons') ?>
            <?php elseif (!$_product->isSaleable()): ?>
            <div class="clearer"></div>
            <div class="add-to-box">
            <?php echo $this->getChildHtml('addto') ?>
            </div>
            <?php endif; ?>

            <?php if ($_product->isSaleable() && $this->hasOptions()):?>
            <?php echo $this->getChildChildHtml('container1', '', true, true) ?>
            <?php endif;?>
            <div class="clearer"></div>
            <?php echo $this->getChildHtml('addthis_sharetool'); ?>


            To just before the current snippet of 181 through 186 (seen here):



            <div class="product-info">
            <div <?php if($enabled_richsnippets) echo $helper_richsnippets->getOfferItemscope(); ?>>
            <?php echo $this->getChildHtml('product_type_data'); ?>
            <?php echo $this->getTierPriceHtml(); ?>
            <?php echo $price_properties; ?>
            </div>


            So new version of lines 181 through 208 will be:



                            <?php if (!$this->hasOptions()):?>
            <div class="clearer"></div>
            <div class="add-to-box">
            <?php if($_product->isSaleable()): ?>
            <?php echo $this->getChildHtml('addtocart') ?>
            <?php if( $this->helper('wishlist')->isAllow() || $_compareUrl=$this->helper('catalog/product_compare')->getAddUrl($_product)): ?>
            <?php endif; ?>
            <?php endif; ?>
            <?php echo $this->getChildHtml('addto') ?>
            </div>
            <?php echo $this->getChildHtml('extra_buttons') ?>
            <?php elseif (!$_product->isSaleable()): ?>
            <div class="clearer"></div>
            <div class="add-to-box">
            <?php echo $this->getChildHtml('addto') ?>
            </div>
            <?php endif; ?>
            <?php if ($_product->isSaleable() && $this->hasOptions()):?>
            <?php echo $this->getChildChildHtml('container1', '', true, true) ?>
            <?php endif;?>
            <div class="clearer"></div>
            <?php echo $this->getChildHtml('addthis_sharetool'); ?>
            <div class="product-info">
            <div <?php if($enabled_richsnippets) echo $helper_richsnippets->getOfferItemscope(); ?>>
            <?php echo $this->getChildHtml('product_type_data'); ?>
            <?php echo $this->getTierPriceHtml(); ?>
            <?php echo $price_properties; ?>
            </div>





            share|improve this answer













            Try moving lines 197 through 219 (seen here):



            <?php if (!$this->hasOptions()):?>
            <div class="clearer"></div>
            <div class="add-to-box">
            <?php if($_product->isSaleable()): ?>
            <?php echo $this->getChildHtml('addtocart') ?>
            <?php if( $this->helper('wishlist')->isAllow() || $_compareUrl=$this->helper('catalog/product_compare')->getAddUrl($_product)): ?>
            <?php endif; ?>
            <?php endif; ?>
            <?php echo $this->getChildHtml('addto') ?>
            </div>
            <?php echo $this->getChildHtml('extra_buttons') ?>
            <?php elseif (!$_product->isSaleable()): ?>
            <div class="clearer"></div>
            <div class="add-to-box">
            <?php echo $this->getChildHtml('addto') ?>
            </div>
            <?php endif; ?>

            <?php if ($_product->isSaleable() && $this->hasOptions()):?>
            <?php echo $this->getChildChildHtml('container1', '', true, true) ?>
            <?php endif;?>
            <div class="clearer"></div>
            <?php echo $this->getChildHtml('addthis_sharetool'); ?>


            To just before the current snippet of 181 through 186 (seen here):



            <div class="product-info">
            <div <?php if($enabled_richsnippets) echo $helper_richsnippets->getOfferItemscope(); ?>>
            <?php echo $this->getChildHtml('product_type_data'); ?>
            <?php echo $this->getTierPriceHtml(); ?>
            <?php echo $price_properties; ?>
            </div>


            So new version of lines 181 through 208 will be:



                            <?php if (!$this->hasOptions()):?>
            <div class="clearer"></div>
            <div class="add-to-box">
            <?php if($_product->isSaleable()): ?>
            <?php echo $this->getChildHtml('addtocart') ?>
            <?php if( $this->helper('wishlist')->isAllow() || $_compareUrl=$this->helper('catalog/product_compare')->getAddUrl($_product)): ?>
            <?php endif; ?>
            <?php endif; ?>
            <?php echo $this->getChildHtml('addto') ?>
            </div>
            <?php echo $this->getChildHtml('extra_buttons') ?>
            <?php elseif (!$_product->isSaleable()): ?>
            <div class="clearer"></div>
            <div class="add-to-box">
            <?php echo $this->getChildHtml('addto') ?>
            </div>
            <?php endif; ?>
            <?php if ($_product->isSaleable() && $this->hasOptions()):?>
            <?php echo $this->getChildChildHtml('container1', '', true, true) ?>
            <?php endif;?>
            <div class="clearer"></div>
            <?php echo $this->getChildHtml('addthis_sharetool'); ?>
            <div class="product-info">
            <div <?php if($enabled_richsnippets) echo $helper_richsnippets->getOfferItemscope(); ?>>
            <?php echo $this->getChildHtml('product_type_data'); ?>
            <?php echo $this->getTierPriceHtml(); ?>
            <?php echo $price_properties; ?>
            </div>






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Jul 6 '16 at 22:11









            Bjerkeseth PrenticeBjerkeseth Prentice

            116




            116













            • it did most of the trick but product price and stock is in buttom now and one of the tab is missing, can you please help me out with this! it would really appreciate it!

              – Shah Ahmad Shaheer
              Jul 6 '16 at 23:28













            • anyone??????????

              – Shah Ahmad Shaheer
              Jul 8 '16 at 9:22



















            • it did most of the trick but product price and stock is in buttom now and one of the tab is missing, can you please help me out with this! it would really appreciate it!

              – Shah Ahmad Shaheer
              Jul 6 '16 at 23:28













            • anyone??????????

              – Shah Ahmad Shaheer
              Jul 8 '16 at 9:22

















            it did most of the trick but product price and stock is in buttom now and one of the tab is missing, can you please help me out with this! it would really appreciate it!

            – Shah Ahmad Shaheer
            Jul 6 '16 at 23:28







            it did most of the trick but product price and stock is in buttom now and one of the tab is missing, can you please help me out with this! it would really appreciate it!

            – Shah Ahmad Shaheer
            Jul 6 '16 at 23:28















            anyone??????????

            – Shah Ahmad Shaheer
            Jul 8 '16 at 9:22





            anyone??????????

            – Shah Ahmad Shaheer
            Jul 8 '16 at 9:22


















            draft saved

            draft discarded




















































            Thanks for contributing an answer to Magento Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f124374%2fmagento-1-9x-layout-setting-single-product-page%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Magento 2 controller redirect on button click in phtml file

            Polycentropodidae