I am working on a Magento 2.1.7 shop and I have created a (custom) child-theme of Magento Blank.
On the product page, I need to add Bootstrap classes to the code below
<!-- Product photo Begin -->
<div class="row">
<div class="product-info">
<div class="product media">
<!-- More code here -->
</div>
<div class="product-info-main">
<!-- More code here -->
</div>
</div>
</div>
<!-- Product photo End -->
like this
<!-- Product Info Begin -->
<div class="row">
<div class="product-info">
<div class="product media col-xs-12 col-sm-4">
<!-- More code here -->
</div>
<div class="product-info-main col-xs-12 col-sm-8">
<!-- More code here -->
</div>
</div>
</div>
so that it aligns nicely.
My catalog_product_view.xml
file contains this code:
<page layout="2columns-left" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<move element="product.info.main" destination="content" before="product.info.media"/>
<move element="product.info.main" destination="content" before="product.info.details"/>
<move element="product.info.details" destination="main"/>
<referenceContainer name="catalog.product.related" remove="true" />
<referenceContainer name="div.sidebar.main" remove="true" />
<referenceContainer name="main" htmlClass="product-info">
</referenceContainer>
</page>
Questions:
- In what files can I find the code for the "Product photo" and "Product info" blocks?
- If it is the case, where, in my custom theme shell I copy them to overwrite the defaults safely (irreversibly)?
.phtml
files corresponding to the blocks I want to add classes to.