How to change layout of product detail page?












5














I've set up a child theme of Luma and want to change the layout of my individual product detail page. What file controls this? I don't see the .phtml file and don't see how changing block order in my xml will accomplish what I need to do.










share|improve this question
















bumped to the homepage by Community yesterday


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




















    5














    I've set up a child theme of Luma and want to change the layout of my individual product detail page. What file controls this? I don't see the .phtml file and don't see how changing block order in my xml will accomplish what I need to do.










    share|improve this question
















    bumped to the homepage by Community yesterday


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


















      5












      5








      5







      I've set up a child theme of Luma and want to change the layout of my individual product detail page. What file controls this? I don't see the .phtml file and don't see how changing block order in my xml will accomplish what I need to do.










      share|improve this question















      I've set up a child theme of Luma and want to change the layout of my individual product detail page. What file controls this? I don't see the .phtml file and don't see how changing block order in my xml will accomplish what I need to do.







      magento2 layout format






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jul 16 '18 at 12:38









      Teja Bhagavan Kollepara

      2,93841847




      2,93841847










      asked Apr 9 '17 at 8:29









      guest

      56115




      56115





      bumped to the homepage by Community yesterday


      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 yesterday


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
























          3 Answers
          3






          active

          oldest

          votes


















          0














          There isn't a single template file for the product page, you can manipulate it by layout.



          See here the doc.



          The main layout file is magento/module-catalog/view/frontend/layout/catalog_product_view.xml



          In order to see the templates that forms the parts of your page, you can activate the template hints in:




          Store -> Configuration -> Advanced -> Developer -> Debug > Enabled
          Template Path Hints for Storefront > Yes







          share|improve this answer





























            0














            To change the layout of individual product detail page, as you have created the child theme assuming your child theme path is something like this



            magento_root/app/design/frontend/company_name/theme_name/



            Now navigate to your child theme and follow these steps.





            1. Create a folder Magento_Catalog and inside it create another folder layout, so the path now looks like this
              (magento_root/app/design/frontend/company_name/theme_name/Magento_Catalog/layout).

            2. Copy your xml file from magento_root/vendor/magento/module-catalog/view/frontend/layout/catalog_product_view.xml


              • Do not edit this as this is core file.



            3. Paste the xml file under magento_root/app/design/frontend/company_name/theme_name/Magento_Catalog/layout/
              now edit this as required.

            4. Create the following path magento_root/app/design/frontend/company_name/theme_name/Magento_Catalog/templates/product/view

            5. Go to magento_root/vendor/magento/module-catalog/view/frontend/templates/product/view/
              where all .phtml files are located which gets required data into
              product details page.

            6. Copy the required .phtml files from core folder(magento_root/vendor/magento/module-catalog/view/frontend/templates/product/view/)
              to your child theme
              folder(magento_root/app/design/frontend/company_name/theme_name/Magento_Catalog/templates/product/view)
              and edit them as required.




            Hope this helps your question.






            share|improve this answer































              0














              You have to change inside layout xml file,



              if you want to display product details page 2column left then change file is catalog_product_view.xml



              set layout value layout="2columns-right" inside node.



              < page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-right" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">






              share|improve this answer





















                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%2f169307%2fhow-to-change-layout-of-product-detail-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














                There isn't a single template file for the product page, you can manipulate it by layout.



                See here the doc.



                The main layout file is magento/module-catalog/view/frontend/layout/catalog_product_view.xml



                In order to see the templates that forms the parts of your page, you can activate the template hints in:




                Store -> Configuration -> Advanced -> Developer -> Debug > Enabled
                Template Path Hints for Storefront > Yes







                share|improve this answer


























                  0














                  There isn't a single template file for the product page, you can manipulate it by layout.



                  See here the doc.



                  The main layout file is magento/module-catalog/view/frontend/layout/catalog_product_view.xml



                  In order to see the templates that forms the parts of your page, you can activate the template hints in:




                  Store -> Configuration -> Advanced -> Developer -> Debug > Enabled
                  Template Path Hints for Storefront > Yes







                  share|improve this answer
























                    0












                    0








                    0






                    There isn't a single template file for the product page, you can manipulate it by layout.



                    See here the doc.



                    The main layout file is magento/module-catalog/view/frontend/layout/catalog_product_view.xml



                    In order to see the templates that forms the parts of your page, you can activate the template hints in:




                    Store -> Configuration -> Advanced -> Developer -> Debug > Enabled
                    Template Path Hints for Storefront > Yes







                    share|improve this answer












                    There isn't a single template file for the product page, you can manipulate it by layout.



                    See here the doc.



                    The main layout file is magento/module-catalog/view/frontend/layout/catalog_product_view.xml



                    In order to see the templates that forms the parts of your page, you can activate the template hints in:




                    Store -> Configuration -> Advanced -> Developer -> Debug > Enabled
                    Template Path Hints for Storefront > Yes








                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Apr 9 '17 at 9:04









                    nuovecode

                    455414




                    455414

























                        0














                        To change the layout of individual product detail page, as you have created the child theme assuming your child theme path is something like this



                        magento_root/app/design/frontend/company_name/theme_name/



                        Now navigate to your child theme and follow these steps.





                        1. Create a folder Magento_Catalog and inside it create another folder layout, so the path now looks like this
                          (magento_root/app/design/frontend/company_name/theme_name/Magento_Catalog/layout).

                        2. Copy your xml file from magento_root/vendor/magento/module-catalog/view/frontend/layout/catalog_product_view.xml


                          • Do not edit this as this is core file.



                        3. Paste the xml file under magento_root/app/design/frontend/company_name/theme_name/Magento_Catalog/layout/
                          now edit this as required.

                        4. Create the following path magento_root/app/design/frontend/company_name/theme_name/Magento_Catalog/templates/product/view

                        5. Go to magento_root/vendor/magento/module-catalog/view/frontend/templates/product/view/
                          where all .phtml files are located which gets required data into
                          product details page.

                        6. Copy the required .phtml files from core folder(magento_root/vendor/magento/module-catalog/view/frontend/templates/product/view/)
                          to your child theme
                          folder(magento_root/app/design/frontend/company_name/theme_name/Magento_Catalog/templates/product/view)
                          and edit them as required.




                        Hope this helps your question.






                        share|improve this answer




























                          0














                          To change the layout of individual product detail page, as you have created the child theme assuming your child theme path is something like this



                          magento_root/app/design/frontend/company_name/theme_name/



                          Now navigate to your child theme and follow these steps.





                          1. Create a folder Magento_Catalog and inside it create another folder layout, so the path now looks like this
                            (magento_root/app/design/frontend/company_name/theme_name/Magento_Catalog/layout).

                          2. Copy your xml file from magento_root/vendor/magento/module-catalog/view/frontend/layout/catalog_product_view.xml


                            • Do not edit this as this is core file.



                          3. Paste the xml file under magento_root/app/design/frontend/company_name/theme_name/Magento_Catalog/layout/
                            now edit this as required.

                          4. Create the following path magento_root/app/design/frontend/company_name/theme_name/Magento_Catalog/templates/product/view

                          5. Go to magento_root/vendor/magento/module-catalog/view/frontend/templates/product/view/
                            where all .phtml files are located which gets required data into
                            product details page.

                          6. Copy the required .phtml files from core folder(magento_root/vendor/magento/module-catalog/view/frontend/templates/product/view/)
                            to your child theme
                            folder(magento_root/app/design/frontend/company_name/theme_name/Magento_Catalog/templates/product/view)
                            and edit them as required.




                          Hope this helps your question.






                          share|improve this answer


























                            0












                            0








                            0






                            To change the layout of individual product detail page, as you have created the child theme assuming your child theme path is something like this



                            magento_root/app/design/frontend/company_name/theme_name/



                            Now navigate to your child theme and follow these steps.





                            1. Create a folder Magento_Catalog and inside it create another folder layout, so the path now looks like this
                              (magento_root/app/design/frontend/company_name/theme_name/Magento_Catalog/layout).

                            2. Copy your xml file from magento_root/vendor/magento/module-catalog/view/frontend/layout/catalog_product_view.xml


                              • Do not edit this as this is core file.



                            3. Paste the xml file under magento_root/app/design/frontend/company_name/theme_name/Magento_Catalog/layout/
                              now edit this as required.

                            4. Create the following path magento_root/app/design/frontend/company_name/theme_name/Magento_Catalog/templates/product/view

                            5. Go to magento_root/vendor/magento/module-catalog/view/frontend/templates/product/view/
                              where all .phtml files are located which gets required data into
                              product details page.

                            6. Copy the required .phtml files from core folder(magento_root/vendor/magento/module-catalog/view/frontend/templates/product/view/)
                              to your child theme
                              folder(magento_root/app/design/frontend/company_name/theme_name/Magento_Catalog/templates/product/view)
                              and edit them as required.




                            Hope this helps your question.






                            share|improve this answer














                            To change the layout of individual product detail page, as you have created the child theme assuming your child theme path is something like this



                            magento_root/app/design/frontend/company_name/theme_name/



                            Now navigate to your child theme and follow these steps.





                            1. Create a folder Magento_Catalog and inside it create another folder layout, so the path now looks like this
                              (magento_root/app/design/frontend/company_name/theme_name/Magento_Catalog/layout).

                            2. Copy your xml file from magento_root/vendor/magento/module-catalog/view/frontend/layout/catalog_product_view.xml


                              • Do not edit this as this is core file.



                            3. Paste the xml file under magento_root/app/design/frontend/company_name/theme_name/Magento_Catalog/layout/
                              now edit this as required.

                            4. Create the following path magento_root/app/design/frontend/company_name/theme_name/Magento_Catalog/templates/product/view

                            5. Go to magento_root/vendor/magento/module-catalog/view/frontend/templates/product/view/
                              where all .phtml files are located which gets required data into
                              product details page.

                            6. Copy the required .phtml files from core folder(magento_root/vendor/magento/module-catalog/view/frontend/templates/product/view/)
                              to your child theme
                              folder(magento_root/app/design/frontend/company_name/theme_name/Magento_Catalog/templates/product/view)
                              and edit them as required.




                            Hope this helps your question.







                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Jul 16 '18 at 12:57









                            Manoj Deswal

                            4,27581742




                            4,27581742










                            answered Feb 16 '18 at 9:18









                            Deepika Koyalkar

                            1




                            1























                                0














                                You have to change inside layout xml file,



                                if you want to display product details page 2column left then change file is catalog_product_view.xml



                                set layout value layout="2columns-right" inside node.



                                < page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-right" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">






                                share|improve this answer


























                                  0














                                  You have to change inside layout xml file,



                                  if you want to display product details page 2column left then change file is catalog_product_view.xml



                                  set layout value layout="2columns-right" inside node.



                                  < page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-right" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">






                                  share|improve this answer
























                                    0












                                    0








                                    0






                                    You have to change inside layout xml file,



                                    if you want to display product details page 2column left then change file is catalog_product_view.xml



                                    set layout value layout="2columns-right" inside node.



                                    < page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-right" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">






                                    share|improve this answer












                                    You have to change inside layout xml file,



                                    if you want to display product details page 2column left then change file is catalog_product_view.xml



                                    set layout value layout="2columns-right" inside node.



                                    < page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-right" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">







                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered Nov 1 '18 at 7:26









                                    Vishal Sanwar

                                    113




                                    113






























                                        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.





                                        Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                                        Please pay close attention to the following guidance:


                                        • 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%2f169307%2fhow-to-change-layout-of-product-detail-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

                                        1300-talet

                                        1300-talet

                                        Display a custom attribute below product name in the front-end Magento 1.9.3.8