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.
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
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
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
Now navigate to your child theme and follow these steps.
- 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).
- 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.
- Paste the xml file under magento_root/app/design/frontend/company_name/theme_name/Magento_Catalog/layout/ now edit this as required.
- Create the following path magento_root/app/design/frontend/company_name/theme_name/Magento_Catalog/templates/product/view
- 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.
- 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.
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
< page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-right" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">