In magento 2 How to customize a sidebar additional in product details page?












2















In custom theme how to customize a sidebar by our requirement in product detail page.



please refer the screen shot
enter image description here










share|improve this question





























    2















    In custom theme how to customize a sidebar by our requirement in product detail page.



    please refer the screen shot
    enter image description here










    share|improve this question



























      2












      2








      2


      1






      In custom theme how to customize a sidebar by our requirement in product detail page.



      please refer the screen shot
      enter image description here










      share|improve this question
















      In custom theme how to customize a sidebar by our requirement in product detail page.



      please refer the screen shot
      enter image description here







      magento2 product-view






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 41 mins ago









      Rakesh Donga

      731111




      731111










      asked 1 hour ago









      divya sekardivya sekar

      579




      579






















          3 Answers
          3






          active

          oldest

          votes


















          2














          Use this code in your /app/design/frontend/[Vendor]/[Themename]/Magento_Catalog/layout/catalog_product_view.xml to add additional sidebar in your product details page



          <referenceContainer name="sidebar.additional">
          <block class="MagentoCatalogBlockProductView" name="product_view_custom_block" before="-" template="Magento_Catalog::product/view/custom_block.phtml"/>
          </referenceContainer>


          And customized it using following way



          <move element="catalog.product.related" destination="sidebar.additional" after="product_view_custom_block"/>
          <referenceBlock name="catalog.compare.sidebar" remove="true" />
          <referenceBlock name="wishlist_sidebar" remove="true" />





          share|improve this answer


























          • I will check and update you in few mins @aasim

            – divya sekar
            47 mins ago











          • Please don't forget to clear cache after change in layout xml files

            – Aasim Goriya
            41 mins ago











          • Its works @aasim thanks

            – divya sekar
            41 mins ago



















          1














          There are different solution of customising sider of product page.



          First you need to create a module or check catalog catalog_product_view.xml in your module or theme frontend layout folder.



          Exact location layout files:



          For Module: appcodeVendorModuleviewfrontendlayoutcatalog_product_view.xml
          For theme: appdesignfrontendVendorthemeMagento_Cataloglayoutcatalog_product_view.xml



          Now if you want to remove existing block from sidebar:



          <?xml version="1.0"?>
          <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>
          <referenceBlock name="catalog.compare.sidebar" remove="true" />
          <referenceBlock name="wishlist_sidebar" remove="true" />
          </body>
          </page>


          Now if you want remove block and add new phtml file for customization it will look like this.



          <?xml version="1.0"?>
          <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>
          <referenceBlock name="catalog.compare.sidebar" remove="true" />
          <referenceBlock name="wishlist_sidebar" remove="true" />
          <referenceContainer name="sidebar.additional">
          <block class="MagentoFrameworkViewElementTemplate" name="product_view_custom_block" before="-" template="Magento_Catalog::product/view/custom_block.phtml"/>
          </referenceContainer>
          </body>
          </page>


          You are also able to add static block to so that you are able to manage this block from admin for this you xml look like this.



          <?xml version="1.0"?>
          <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>
          <referenceBlock name="catalog.compare.sidebar" remove="true" />
          <referenceBlock name="wishlist_sidebar" remove="true" />
          <referenceContainer name="sidebar.additional">
          <block class="MagentoCmsBlockBlock" name="custom_block">
          <arguments>
          <argument name="block_id" xsi:type="string">custom_block</argument>
          </arguments>
          </block>
          </referenceContainer>
          </body>
          </page>


          Note: custom_block is block identifier (Admin->Content->Block) you need to create new block with this identifier.






          share|improve this answer
























          • Thanks @aman alam

            – divya sekar
            35 mins ago



















          1














          if file exist then open below file otherwise create




          /app/design/frontend/{Vendor}/{Themename}/Magento_Catalog/layout/catalog_product_view.xml




          and just add



          <referenceBlock name="catalog.compare.sidebar" remove="true" />
          <referenceBlock name="wishlist_sidebar" remove="true" />





          share|improve this answer
























          • its simple and works

            – divya sekar
            25 mins ago











          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%2f259730%2fin-magento-2-how-to-customize-a-sidebar-additional-in-product-details-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









          2














          Use this code in your /app/design/frontend/[Vendor]/[Themename]/Magento_Catalog/layout/catalog_product_view.xml to add additional sidebar in your product details page



          <referenceContainer name="sidebar.additional">
          <block class="MagentoCatalogBlockProductView" name="product_view_custom_block" before="-" template="Magento_Catalog::product/view/custom_block.phtml"/>
          </referenceContainer>


          And customized it using following way



          <move element="catalog.product.related" destination="sidebar.additional" after="product_view_custom_block"/>
          <referenceBlock name="catalog.compare.sidebar" remove="true" />
          <referenceBlock name="wishlist_sidebar" remove="true" />





          share|improve this answer


























          • I will check and update you in few mins @aasim

            – divya sekar
            47 mins ago











          • Please don't forget to clear cache after change in layout xml files

            – Aasim Goriya
            41 mins ago











          • Its works @aasim thanks

            – divya sekar
            41 mins ago
















          2














          Use this code in your /app/design/frontend/[Vendor]/[Themename]/Magento_Catalog/layout/catalog_product_view.xml to add additional sidebar in your product details page



          <referenceContainer name="sidebar.additional">
          <block class="MagentoCatalogBlockProductView" name="product_view_custom_block" before="-" template="Magento_Catalog::product/view/custom_block.phtml"/>
          </referenceContainer>


          And customized it using following way



          <move element="catalog.product.related" destination="sidebar.additional" after="product_view_custom_block"/>
          <referenceBlock name="catalog.compare.sidebar" remove="true" />
          <referenceBlock name="wishlist_sidebar" remove="true" />





          share|improve this answer


























          • I will check and update you in few mins @aasim

            – divya sekar
            47 mins ago











          • Please don't forget to clear cache after change in layout xml files

            – Aasim Goriya
            41 mins ago











          • Its works @aasim thanks

            – divya sekar
            41 mins ago














          2












          2








          2







          Use this code in your /app/design/frontend/[Vendor]/[Themename]/Magento_Catalog/layout/catalog_product_view.xml to add additional sidebar in your product details page



          <referenceContainer name="sidebar.additional">
          <block class="MagentoCatalogBlockProductView" name="product_view_custom_block" before="-" template="Magento_Catalog::product/view/custom_block.phtml"/>
          </referenceContainer>


          And customized it using following way



          <move element="catalog.product.related" destination="sidebar.additional" after="product_view_custom_block"/>
          <referenceBlock name="catalog.compare.sidebar" remove="true" />
          <referenceBlock name="wishlist_sidebar" remove="true" />





          share|improve this answer















          Use this code in your /app/design/frontend/[Vendor]/[Themename]/Magento_Catalog/layout/catalog_product_view.xml to add additional sidebar in your product details page



          <referenceContainer name="sidebar.additional">
          <block class="MagentoCatalogBlockProductView" name="product_view_custom_block" before="-" template="Magento_Catalog::product/view/custom_block.phtml"/>
          </referenceContainer>


          And customized it using following way



          <move element="catalog.product.related" destination="sidebar.additional" after="product_view_custom_block"/>
          <referenceBlock name="catalog.compare.sidebar" remove="true" />
          <referenceBlock name="wishlist_sidebar" remove="true" />






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 49 mins ago

























          answered 54 mins ago









          Aasim GoriyaAasim Goriya

          3,1251734




          3,1251734













          • I will check and update you in few mins @aasim

            – divya sekar
            47 mins ago











          • Please don't forget to clear cache after change in layout xml files

            – Aasim Goriya
            41 mins ago











          • Its works @aasim thanks

            – divya sekar
            41 mins ago



















          • I will check and update you in few mins @aasim

            – divya sekar
            47 mins ago











          • Please don't forget to clear cache after change in layout xml files

            – Aasim Goriya
            41 mins ago











          • Its works @aasim thanks

            – divya sekar
            41 mins ago

















          I will check and update you in few mins @aasim

          – divya sekar
          47 mins ago





          I will check and update you in few mins @aasim

          – divya sekar
          47 mins ago













          Please don't forget to clear cache after change in layout xml files

          – Aasim Goriya
          41 mins ago





          Please don't forget to clear cache after change in layout xml files

          – Aasim Goriya
          41 mins ago













          Its works @aasim thanks

          – divya sekar
          41 mins ago





          Its works @aasim thanks

          – divya sekar
          41 mins ago













          1














          There are different solution of customising sider of product page.



          First you need to create a module or check catalog catalog_product_view.xml in your module or theme frontend layout folder.



          Exact location layout files:



          For Module: appcodeVendorModuleviewfrontendlayoutcatalog_product_view.xml
          For theme: appdesignfrontendVendorthemeMagento_Cataloglayoutcatalog_product_view.xml



          Now if you want to remove existing block from sidebar:



          <?xml version="1.0"?>
          <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>
          <referenceBlock name="catalog.compare.sidebar" remove="true" />
          <referenceBlock name="wishlist_sidebar" remove="true" />
          </body>
          </page>


          Now if you want remove block and add new phtml file for customization it will look like this.



          <?xml version="1.0"?>
          <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>
          <referenceBlock name="catalog.compare.sidebar" remove="true" />
          <referenceBlock name="wishlist_sidebar" remove="true" />
          <referenceContainer name="sidebar.additional">
          <block class="MagentoFrameworkViewElementTemplate" name="product_view_custom_block" before="-" template="Magento_Catalog::product/view/custom_block.phtml"/>
          </referenceContainer>
          </body>
          </page>


          You are also able to add static block to so that you are able to manage this block from admin for this you xml look like this.



          <?xml version="1.0"?>
          <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>
          <referenceBlock name="catalog.compare.sidebar" remove="true" />
          <referenceBlock name="wishlist_sidebar" remove="true" />
          <referenceContainer name="sidebar.additional">
          <block class="MagentoCmsBlockBlock" name="custom_block">
          <arguments>
          <argument name="block_id" xsi:type="string">custom_block</argument>
          </arguments>
          </block>
          </referenceContainer>
          </body>
          </page>


          Note: custom_block is block identifier (Admin->Content->Block) you need to create new block with this identifier.






          share|improve this answer
























          • Thanks @aman alam

            – divya sekar
            35 mins ago
















          1














          There are different solution of customising sider of product page.



          First you need to create a module or check catalog catalog_product_view.xml in your module or theme frontend layout folder.



          Exact location layout files:



          For Module: appcodeVendorModuleviewfrontendlayoutcatalog_product_view.xml
          For theme: appdesignfrontendVendorthemeMagento_Cataloglayoutcatalog_product_view.xml



          Now if you want to remove existing block from sidebar:



          <?xml version="1.0"?>
          <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>
          <referenceBlock name="catalog.compare.sidebar" remove="true" />
          <referenceBlock name="wishlist_sidebar" remove="true" />
          </body>
          </page>


          Now if you want remove block and add new phtml file for customization it will look like this.



          <?xml version="1.0"?>
          <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>
          <referenceBlock name="catalog.compare.sidebar" remove="true" />
          <referenceBlock name="wishlist_sidebar" remove="true" />
          <referenceContainer name="sidebar.additional">
          <block class="MagentoFrameworkViewElementTemplate" name="product_view_custom_block" before="-" template="Magento_Catalog::product/view/custom_block.phtml"/>
          </referenceContainer>
          </body>
          </page>


          You are also able to add static block to so that you are able to manage this block from admin for this you xml look like this.



          <?xml version="1.0"?>
          <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>
          <referenceBlock name="catalog.compare.sidebar" remove="true" />
          <referenceBlock name="wishlist_sidebar" remove="true" />
          <referenceContainer name="sidebar.additional">
          <block class="MagentoCmsBlockBlock" name="custom_block">
          <arguments>
          <argument name="block_id" xsi:type="string">custom_block</argument>
          </arguments>
          </block>
          </referenceContainer>
          </body>
          </page>


          Note: custom_block is block identifier (Admin->Content->Block) you need to create new block with this identifier.






          share|improve this answer
























          • Thanks @aman alam

            – divya sekar
            35 mins ago














          1












          1








          1







          There are different solution of customising sider of product page.



          First you need to create a module or check catalog catalog_product_view.xml in your module or theme frontend layout folder.



          Exact location layout files:



          For Module: appcodeVendorModuleviewfrontendlayoutcatalog_product_view.xml
          For theme: appdesignfrontendVendorthemeMagento_Cataloglayoutcatalog_product_view.xml



          Now if you want to remove existing block from sidebar:



          <?xml version="1.0"?>
          <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>
          <referenceBlock name="catalog.compare.sidebar" remove="true" />
          <referenceBlock name="wishlist_sidebar" remove="true" />
          </body>
          </page>


          Now if you want remove block and add new phtml file for customization it will look like this.



          <?xml version="1.0"?>
          <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>
          <referenceBlock name="catalog.compare.sidebar" remove="true" />
          <referenceBlock name="wishlist_sidebar" remove="true" />
          <referenceContainer name="sidebar.additional">
          <block class="MagentoFrameworkViewElementTemplate" name="product_view_custom_block" before="-" template="Magento_Catalog::product/view/custom_block.phtml"/>
          </referenceContainer>
          </body>
          </page>


          You are also able to add static block to so that you are able to manage this block from admin for this you xml look like this.



          <?xml version="1.0"?>
          <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>
          <referenceBlock name="catalog.compare.sidebar" remove="true" />
          <referenceBlock name="wishlist_sidebar" remove="true" />
          <referenceContainer name="sidebar.additional">
          <block class="MagentoCmsBlockBlock" name="custom_block">
          <arguments>
          <argument name="block_id" xsi:type="string">custom_block</argument>
          </arguments>
          </block>
          </referenceContainer>
          </body>
          </page>


          Note: custom_block is block identifier (Admin->Content->Block) you need to create new block with this identifier.






          share|improve this answer













          There are different solution of customising sider of product page.



          First you need to create a module or check catalog catalog_product_view.xml in your module or theme frontend layout folder.



          Exact location layout files:



          For Module: appcodeVendorModuleviewfrontendlayoutcatalog_product_view.xml
          For theme: appdesignfrontendVendorthemeMagento_Cataloglayoutcatalog_product_view.xml



          Now if you want to remove existing block from sidebar:



          <?xml version="1.0"?>
          <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>
          <referenceBlock name="catalog.compare.sidebar" remove="true" />
          <referenceBlock name="wishlist_sidebar" remove="true" />
          </body>
          </page>


          Now if you want remove block and add new phtml file for customization it will look like this.



          <?xml version="1.0"?>
          <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>
          <referenceBlock name="catalog.compare.sidebar" remove="true" />
          <referenceBlock name="wishlist_sidebar" remove="true" />
          <referenceContainer name="sidebar.additional">
          <block class="MagentoFrameworkViewElementTemplate" name="product_view_custom_block" before="-" template="Magento_Catalog::product/view/custom_block.phtml"/>
          </referenceContainer>
          </body>
          </page>


          You are also able to add static block to so that you are able to manage this block from admin for this you xml look like this.



          <?xml version="1.0"?>
          <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>
          <referenceBlock name="catalog.compare.sidebar" remove="true" />
          <referenceBlock name="wishlist_sidebar" remove="true" />
          <referenceContainer name="sidebar.additional">
          <block class="MagentoCmsBlockBlock" name="custom_block">
          <arguments>
          <argument name="block_id" xsi:type="string">custom_block</argument>
          </arguments>
          </block>
          </referenceContainer>
          </body>
          </page>


          Note: custom_block is block identifier (Admin->Content->Block) you need to create new block with this identifier.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 37 mins ago









          Aman AlamAman Alam

          933519




          933519













          • Thanks @aman alam

            – divya sekar
            35 mins ago



















          • Thanks @aman alam

            – divya sekar
            35 mins ago

















          Thanks @aman alam

          – divya sekar
          35 mins ago





          Thanks @aman alam

          – divya sekar
          35 mins ago











          1














          if file exist then open below file otherwise create




          /app/design/frontend/{Vendor}/{Themename}/Magento_Catalog/layout/catalog_product_view.xml




          and just add



          <referenceBlock name="catalog.compare.sidebar" remove="true" />
          <referenceBlock name="wishlist_sidebar" remove="true" />





          share|improve this answer
























          • its simple and works

            – divya sekar
            25 mins ago
















          1














          if file exist then open below file otherwise create




          /app/design/frontend/{Vendor}/{Themename}/Magento_Catalog/layout/catalog_product_view.xml




          and just add



          <referenceBlock name="catalog.compare.sidebar" remove="true" />
          <referenceBlock name="wishlist_sidebar" remove="true" />





          share|improve this answer
























          • its simple and works

            – divya sekar
            25 mins ago














          1












          1








          1







          if file exist then open below file otherwise create




          /app/design/frontend/{Vendor}/{Themename}/Magento_Catalog/layout/catalog_product_view.xml




          and just add



          <referenceBlock name="catalog.compare.sidebar" remove="true" />
          <referenceBlock name="wishlist_sidebar" remove="true" />





          share|improve this answer













          if file exist then open below file otherwise create




          /app/design/frontend/{Vendor}/{Themename}/Magento_Catalog/layout/catalog_product_view.xml




          and just add



          <referenceBlock name="catalog.compare.sidebar" remove="true" />
          <referenceBlock name="wishlist_sidebar" remove="true" />






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 31 mins ago









          Rakesh DongaRakesh Donga

          731111




          731111













          • its simple and works

            – divya sekar
            25 mins ago



















          • its simple and works

            – divya sekar
            25 mins ago

















          its simple and works

          – divya sekar
          25 mins ago





          its simple and works

          – divya sekar
          25 mins ago


















          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%2f259730%2fin-magento-2-how-to-customize-a-sidebar-additional-in-product-details-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

          CARDNET

          Boot-repair Failure: Unable to locate package grub-common:i386

          濃尾地震