0

I want to put the Tabs block after Related prducts block, like this:

enter image description here

This is the URL of my page:

http://www.trucchidishampoo.it/index.php/wild-cow-shampoo-tonificante.html

I'd try to use the before and the after tag but doesn't work, maybe I'm doing something wrong.

This is the code of my local.xml file (only the part that interests me):

<catalog_product_view>
    <reference name="head">
        <action ifconfig="sebian/product_detail_zoom/enable_zoom" method="addItem"><type>skin_js</type><name>vendors/cloudzoom/js/cloud-zoom.1.0.3.js</name></action>
        <action ifconfig="sebian/product_detail_zoom/enable_zoom" method="addItem"><type>skin_js</type><name>vendors/cloudzoom/js/jquery.mousewheel-3.0.6.pack.js</name></action>
    </reference>
    <reference name="root">
        <action method="setTemplate"><template>page/1column.phtml</template></action>
    </reference>
    <reference name="product.info">
        <block type="catalog/product_view" name="product.info.prevnext" as="prev_next" template="catalog/product/view/prevnext.phtml"/>
        <block type="catalog/product_view" name="product.info.sharing" as="sharing" template="catalog/product/view/sharing.phtml"/>
        <block type="catalog/product_view_tabs" name="product.info.tabs" as="info_tabs" template="catalog/product/view/tabs.phtml" >
            <action method="addTab" translate="title" module="catalog">
                <alias>description</alias>
                <title>Description</title>
                <block>catalog/product_view_description</block>
                <template>catalog/product/view/description.phtml</template>
            </action>
            <action method="addTab" translate="title" module="catalog">
                <alias>product_additional</alias>
                <title>Additional Information</title>
                <block>catalog/product_view_attributes</block>
                <template>catalog/product/view/attributes.phtml</template>
            </action>
            <action method="addTab" translate="title" module="catalog">
                <alias>tabreviews</alias>
                <title>Reviews</title>
                <block>review/product_view_list</block>
                <template>review/product/view/list.phtml</template>
            </action>
            <action method="addTab" translate="title" module="tag">
                <alias>product_tags</alias>
                <title>Tags</title>
                <block>tag/product_list</block>
                <template>tag/list.phtml</template>
            </action>
        </block>
        <block type="catalog/product_list_upsell" name="upsell_products" template="catalog/product/list/upsell.phtml"/>
        <reference name="upsell_products">
            <action method="setItemLimit"><type>upsell</type><limit>8</limit></action>
        </reference>
        <block type="catalog/product_list_related" name="related_products" template="catalog/product/list/related.phtml"/>
        <reference name="related_products">
            <action method="setItemLimit"><type>related</type><limit>8</limit></action>
        </reference>
        <reference name="tabreviews">
            <block type="review/form" name="product.review.form" as="review_form">
                <block type="page/html_wrapper" name="product.review.form.fields.before" as="form_fields_before" translate="label">
                    <label>Review Form Fields Before</label>
                    <action method="setMayBeInvisible"><value>1</value></action>
                </block>
            </block>
        </reference>
        <block type="cms/block" name="arw.layout.product.left">
            <action method="setBlockId"><block_id>arw_sebian_block_product_details_left</block_id></action>
        </block>
        <block type="cms/block" name="arw.layout.product.right">
            <action method="setBlockId"><block_id>arw_sebian_block_product_details_right</block_id></action>
        </block>
        <block type="cms/block" name="arw.layout.product.collateral.left">
            <action method="setBlockId"><block_id>arw_sebian_block_product_collateral_left</block_id></action>
        </block>
        <block type="cms/block" name="arw.layout.product.collateral.right">
            <action method="setBlockId"><block_id>arw_sebian_block_product_collateral_right</block_id></action>
        </block>
    </reference>
</catalog_product_view>
  • share your view.phtml code – Murtuza Zabuawala Nov 23 '16 at 10:19
  • I added the code of view.phtml file – Crashy Nov 23 '16 at 10:56
0

Please change code in view.phtml from:

<div class="product-collateral">
        <div class="row">
            <?php if ($info_tabs = $this->getChildHtml('info_tabs')) : ?>
            <div class="margin-bottom-30 product-collateral-middle<?php echo $collateral_tab_class?>">
                <?php echo $info_tabs; ?>
            </div>
            <?php endif;?>
            <?php if($collateral_left):?>
            <div class="margin-bottom-30 product-collateral-item product-collateral-left<?php echo $collateral_left_class?>"><?php echo $collateral_left;?></div>
            <?php endif;?>
            <?php if($collateral_right):?>
                <div class="margin-bottom-30 product-collateral-item product-collateral-right<?php echo $collateral_right_class?>"><?php echo $collateral_right;?></div>
            <?php endif;?>
        </div>
        <?php echo $this->getChildHtml('related_products')?>
        <?php echo $this->getChildHtml('upsell_products')?>
    </div>

to:

<div class="product-collateral">
        <?php echo $this->getChildHtml('related_products')?>
        <?php echo $this->getChildHtml('upsell_products')?>
        <div class="row">
            <?php if ($info_tabs = $this->getChildHtml('info_tabs')) : ?>
            <div class="margin-bottom-30 product-collateral-middle<?php echo $collateral_tab_class?>">
                <?php echo $info_tabs; ?>
            </div>
            <?php endif;?>
            <?php if($collateral_left):?>
            <div class="margin-bottom-30 product-collateral-item product-collateral-left<?php echo $collateral_left_class?>"><?php echo $collateral_left;?></div>
            <?php endif;?>
            <?php if($collateral_right):?>
                <div class="margin-bottom-30 product-collateral-item product-collateral-right<?php echo $collateral_right_class?>"><?php echo $collateral_right;?></div>
            <?php endif;?>
        </div>
    </div>

There is nothing to do with layout xml file in this case.

Please let me know if you still have any problem.

0

This is the code of my view.phtml:

<?php
$theme_helper = $this->helper('sebian');
$_catalog_details_layout = $theme_helper->getCfg('product_details/product_style');


$collateral_left_class = $collateral_left = $collateral_right_class = $collateral_right ='';
$collateral_tab_class = 'col-xs-12 col-sm-12 col-md-12 col-lg-12';
if($collateral_left = $this->getChildHtml('arw.layout.product.collateral.left')){
    $collateral_left_class = ' col-xs-12 col-sm-4 col-md-4 col-lg-4 col-md-pull-8 col-lg-pull-8';
    $collateral_tab_class = ' col-xs-12 col-sm-8 col-md-8 col-lg-8 col-md-push-4 col-lg-push-4';
}
if($collateral_right = $this->getChildHtml('arw.layout.product.collateral.right')){
    $collateral_right_class = ' col-xs-12 col-sm-4 col-md-4 col-lg-4';
    $collateral_tab_class = ' col-xs-12 col-sm-8 col-md-8 col-lg-8';
    if($collateral_left != ''){
        $collateral_right_class = ' col-xs-12 col-sm-3 col-md-3';
        $collateral_left_class = ' col-xs-12 col-sm-3 col-md-3 col-lg-3 col-md-pull-6 col-lg-pull-6';
        $collateral_tab_class = ' col-xs-12 col-sm-6 col-md-6 col-lg-6 col-md-push-3 col-lg-push-3';
    }
}
$_helper = $this->helper('catalog/output');
$_product = $this->getProduct();

?>
<script type="text/javascript">
    var optionsPrice = new Product.OptionsPrice(<?php echo $this->getJsonConfig() ?>);
</script>
<div class="page-title">
    <h1><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></h1>
</div>
<div class="product-view" itemscope itemtype="http://schema.org/Product">
    <div id="messages_product_view"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?></div>
    <div class="product-essential">
        <div class="row">
            <div class="col-main-details col-main-details-<?php echo $_catalog_details_layout?>">
                <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">
                        <?php /* Hidden product id for ajax cart */?>
                        <input id="product_id_hidden" type="hidden" name="product" value="<?php echo $_product->getId() ?>" />
                        <input type="hidden" name="related_product" id="related-products-field" value="" />
                    </div>
                    <div class="row">
                        <div class="product-img-box col-xs-12 col-sm-12 col-md-12 col-lg-12">
                            <?php echo $this->getChildHtml('media') ?>
                        </div>
                        <div class="product-shop col-xs-12 col-sm-12 col-md-12 col-lg-12">
                            <div class="product-shop-inner">
                                <div class="product-name">
                                    <span itemprop="name"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></span>
                                </div>
                                <?php echo $this->getChildHtml('prev_next') ?>
                                <?php echo $this->getChildHtml('alert_urls') ?>
                                <div  itemprop="offers" itemscope itemtype="<?php echo $_product->getTypeId() == "bundle" ? 'http://schema.org/AggregateOffer' : 'http://schema.org/Offer'?>">
                                    <?php echo $this->getChildHtml('product_type_data') ?>
                                    <meta itemprop="priceCurrency" content="<?php echo $currency_code = Mage::app()->getStore()->getCurrentCurrencyCode(); ?>"/>
                                    <?php if ($_product->isAvailable()): ?>
                                        <meta itemprop="availability" href="http://schema.org/InStock"/>
                                    <?php else:?>
                                        <meta itemprop="availability" href="http://schema.org/OutOfStock"/>
                                    <?php endif;?>
                                    <?php echo $this->getTierPriceHtml() ?>
                                </div>
                                <p class="product-sku"><span><?php echo $this->__("Product code:")?></span><span itemprop="sku"><?php echo $_product->getSku();?></span></p>
                                <div class="clearfix product-wrap-1">
                                    <?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>
                                    <div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
                                        <meta itemprop="name" content="<?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?>"/>
                                        <?php echo '<div class="pulsante-review">'.$this->getReviewsSummaryHtml($_product, false, true).'</div>';?>
                                    </div>
                                <div class="clearfix"></div>
                                <?php echo $this->getChildHtml('extrahint') ?>
                                <div class="clearfix"></div>
                                <?php if ($_product->getShortDescription()):?>
                                    <div class="short-description">
                                        <div class="std" itemprop="description"><?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?></div>
                                    </div>
                                <?php endif;?>
                                <?php if (!$this->hasOptions()):?>
                                    <div class="add-to-box clearfix">
                                        <?php if($_product->isSaleable()): ?>
                                            <?php echo $this->getChildHtml('addtocart') ?>
                                        <?php endif; ?>
                                        <?php echo $this->getChildHtml('addto') ?>
                                    </div>
                                    <?php echo $this->getChildHtml('extra_buttons') ?>
                                <?php elseif (!$_product->isSaleable()): ?>
                                    <div class="add-to-box clearfix">
                                        <?php echo $this->getChildHtml('addto') ?>
                                    </div>
                                <?php endif; ?>

                                <?php echo $this->getChildHtml('other');?>

                                <?php if ($_product->isSaleable() && $this->hasOptions()):?>
                                    <?php echo $this->getChildChildHtml('container1', '', true, true) ?>
                                <?php endif;?>

                                <?php if ($_product->isSaleable() && $this->hasOptions()):?>
                                    <?php echo $this->getChildChildHtml('container2', '', true, true) ?>
                                <?php endif;?>
                                <?php echo $this->getChildHtml('sharing');?>
                            </div>
                        </div>
                    </div>
                </form>
                <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;
                            }
                        }
                    }.bind(productAddToCartForm);

                    productAddToCartForm.submitLight = function(button, url){
                        if(this.validator) {
                            var nv = Validation.methods;
                            delete Validation.methods['required-entry'];
                            delete Validation.methods['validate-one-required'];
                            delete Validation.methods['validate-one-required-by-name'];
                            // Remove custom datetime validators
                            for (var methodName in Validation.methods) {
                                if (methodName.match(/^validate-datetime-.*/i)) {
                                    delete Validation.methods[methodName];
                                }
                            }

                            if (this.validator.validate()) {
                                if (url) {
                                    this.form.action = url;
                                }
                                this.form.submit();
                            }
                            Object.extend(Validation.methods, nv);
                        }
                    }.bind(productAddToCartForm);
                    //]]>
                </script>
            </div>
        </div>
    </div>

    <div class="product-collateral">
        <div class="row">
            <?php if ($info_tabs = $this->getChildHtml('info_tabs')) : ?>
            <div class="margin-bottom-30 product-collateral-middle<?php echo $collateral_tab_class?>">
                <?php echo $info_tabs; ?>
            </div>
            <?php endif;?>
            <?php if($collateral_left):?>
            <div class="margin-bottom-30 product-collateral-item product-collateral-left<?php echo $collateral_left_class?>"><?php echo $collateral_left;?></div>
            <?php endif;?>
            <?php if($collateral_right):?>
                <div class="margin-bottom-30 product-collateral-item product-collateral-right<?php echo $collateral_right_class?>"><?php echo $collateral_right;?></div>
            <?php endif;?>
        </div>
        <?php echo $this->getChildHtml('related_products')?>
        <?php echo $this->getChildHtml('upsell_products')?>
    </div>
</div>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.