1

I am new to magento2 and I have very few knowledge about it, I am using Porto theme on magento 2.3.0 CE. I am trying to move the short description under the product image.

Here is what I have :Magento2 short description Default

Here is what I want : Magento2 short description Below

I managed to get the short description under the social links by using this code :

<move element="product.info.overview" destination="product.info.main" after="product-social-links"/> 

But I don't know how to put it under the image. Here is my catalog_product_view.xml :

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2018 Porto. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page layout="2columns-right" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="sidebar.additional">
            <block class="Smartwave\Porto\Block\Template" name="product_view_custom_block" before="-" template="Magento_Catalog::product/view/custom_block.phtml"/>
        </referenceContainer>
        <move element="product.info.stock.sku" destination="product.info.price" after="product.price.final"/>
        <move element="product.info.review" destination="product.info.main" before="product.info.price"/>
        <move element="catalog.product.related" destination="sidebar.additional" after="product_view_custom_block"/>
        <!--<referenceBlock name="catalog.product.related" remove="true"/>-->
        <move element="product.info.overview" destination="product.info.main" after="product.info.review"/>
        <referenceContainer name="after.body.start">
            <block class="Magento\Catalog\Block\Product\View" name="product_custom" template="Magento_Catalog::product/view/product_custom.phtml" before="-"/>
            <block class="Smartwave\Porto\Block\Template" name="product_view_config" after="-" template="Magento_Catalog::product/view/config.phtml"/>
        </referenceContainer>
        <referenceContainer name="columns.top">
            <block class="Magento\Catalog\Block\Product\View" name="prev_next_products" template="Magento_Catalog::product/view/prev_next.phtml" before="-"/>
        </referenceContainer>
        <move element="prev_next_products" destination="product.info.main" before="-"/>
        <move element="page.main.title" destination="product.info.main" before="-"/>
        <referenceContainer name="product.info.social">
            <block class="Smartwave\Porto\Block\Template" name="product_view_addthis_links" after="-" template="Magento_Catalog::product/view/addthis.phtml"/>
        </referenceContainer>
        <referenceContainer name="content">
            <block class="Smartwave\Porto\Block\RickSnippet" name="rich_snippet" template="Magento_Catalog::product/view/rich_snippet.phtml" before="-"/>
            <block class="Smartwave\Porto\Block\Template" name="product_view_main_custom_block" ifconfig="porto_settings/product/main_custom_block" before="product.info.main" template="Magento_Catalog::product/view/main_custom_block.phtml"/>
            <block class="Smartwave\Porto\Block\Template" name="product_view_main_custom_block2" after="-" template="Magento_Catalog::product/view/main_custom_block2.phtml"/>
            <block class="Smartwave\Porto\Block\Template" name="product.clearer" after="product.info.media" template="Magento_Catalog::product/view/clearer.phtml"/>
        </referenceContainer>
        <move element="product_view_main_custom_block2" destination="product.info.main" after="product.info.overview"/>
        <move element="product.info.main" destination="content" after="product.info.media"/>
        <referenceContainer name="columns">
            <block class="Smartwave\Porto\Block\Template" name="side_popup" after="-" template="Magento_Catalog::product/view/side_popup.phtml"/>
        </referenceContainer>
    </body>
</page>

And this is my default.xml :

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="head.additional">
            <block class="Smartwave\Porto\Block\Template" name="porto_custom_head" template="html/head.phtml" before="-"/>
        </referenceContainer>
        <referenceContainer name="after.body.start">
            <block class="Magento\Newsletter\Block\Subscribe" name="porto_newsletter_popup" template="subscribe_popup.phtml" before="-"/>
            <block class="Smartwave\Porto\Block\Template" name="porto_custom_notice" template="html/custom_notice.phtml" after="-"/>
            <block class="Smartwave\Porto\Block\Template" name="porto_sidebar_sticky" template="html/sidebar_sticky.phtml" after="-"/>
        </referenceContainer>
        <referenceContainer name="page.wrapper">
            <block class="Smartwave\Porto\Block\Template" name="porto_header" template="html/header.phtml" before="main.content">
                <block class="Magento\Framework\View\Element\Html\Links" name="header.links">
                    <arguments>
                        <argument name="css_class" xsi:type="string">header links</argument>
                    </arguments>
                </block>
                <block class="Smartwave\Porto\Block\Form\Login" name="header_customer_form_login" ifconfig="porto_settings/header/login_popup" template="Smartwave_Porto::html/login.phtml"/>
                <block class="Magento\Store\Block\Switcher" name="store_language" as="store_language" template="switch/languages.phtml"/>
                <block class="Magento\Framework\View\Element\Template" name="top.search" as="topSearch" template="Magento_Search::form.mini.phtml" />
                <block class="Smartwave\Porto\Block\Template" name="custom_block" template="html/header_custom_block.phtml" ifconfig="porto_settings/header/static_block" after="-"/>
            </block>
        </referenceContainer>
        <move element="navigation.sections" destination="porto_header"/>
        <move element="top.search" destination="porto_header"/>
        <move element="minicart" destination="porto_header"/>
        <move element="currency" destination="porto_header"/>
        <move element="logo" destination="porto_header"/>
        <move element="skip_to_content" destination="porto_header"/>

        <move element="page.top" destination="page.wrapper" after="porto_header"/>

        <referenceContainer name="header.container" remove="1"/>
        <referenceContainer name="header.panel" remove="1"/>
        <referenceContainer name="header-wrapper" remove="1"/>

        <referenceContainer name="footer-container">
            <block class="Smartwave\Porto\Block\Template" name="footer_block" template="html/footer.phtml">
                <block class="Magento\Store\Block\Switcher" name="footer.store_switcher" template="switch/stores.phtml"/>
                <block class="Magento\Newsletter\Block\Subscribe" name="footer.newsletter" template="subscribe_footer.phtml"/>
            </block>
        </referenceContainer>

        <referenceBlock name="header.links">
            <block class="Smartwave\Porto\Block\Template" name="custom_link" before="authorization-link-login" template="html/custom_link.phtml" />
        </referenceBlock>
    </body>
</page>

Thanks for your help.

4 Answers 4

1

Add code in catalog_product_view.xml before body ends.

<move element="product.info.overview" destination="product.info.media" after="-"/>
2
  • Many thanks for your answer, it's almost good except that I want the short description with a 100% width so I think I need to add a new container and put the short description in it. Any idea how I can achieve this ?
    – mggrow
    Commented Feb 10, 2020 at 14:57
  • for 100% width you can update above code by: <move element="product.info.overview" destination="content" before="product.info.details"/> Commented Feb 10, 2020 at 15:48
0
<move element="product.info.overview" destination="content" before="product.info.details"/>

This will work if you want to show below media image with 100% width

0

Put this code in your theme catalog_product_view.xml file before </body> so it will so fullwidth.

<move element="product.info.overview" destination="content" after="product.info.media"/>
0

Add the below code in catalog_product_view.xml before the body ends.

<move element="product.info.overview" destination="product.info.media"/>

Run comand php bin/magento cache:flush and check

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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