0

What's up guys, i know this is some kind of basic question, but here's the thing, i can't change page layout from catalog_product_view.xml to 1column.
I've try using new custom theme, and EVERY content in that custom them is worked perfectly, but not with the layout="1column" in catalog_product_view.xml
Here is it:

C:\xampp\htdocs\my-project\app\design\frontend\Gssi\jewellery\Magento_Catalog\layout\catalog_product_view.xml

<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <!-- create new custom tab in product detail page -->
        <referenceBlock name="product.info.details">
          <block class="Magento\Catalog\Block\Product\View" name="custom.tab" as="custom_tab" template="product/view/custom_tab.phtml" group="detailed_info" >
             <arguments>
                <argument translate="true" name="title" xsi:type="string">Custom Tab</argument>
             </arguments>
          </block>
        </referenceBlock>

        <move element="product.info.details" destination="product.info.extrahint"></move>
    </body>
</page>

You see, every content in this file is worked. the referenceBlock name="product.info.details" work, the move element="product.info.details" work. But not with the layout="1column".

Are there something in admin page that i need to check? I've searching everywhere but can't find anything ..
Any idea? Please help, thanks :)

  • Have you tried reindexing/recompiling ? sudo php bin/magento setup:di:compile && sudo php bin/magento indexer:reindex – Aditya Shah Oct 6 '18 at 14:52
  • and is it a migration project ? – Aditya Shah Oct 6 '18 at 14:53
  • i was be told that di:compile does nothing, i never use di:compile :( – fudu Oct 6 '18 at 14:56
  • what is migration project? – fudu Oct 6 '18 at 14:56
  • Okay let me check – Aditya Shah Oct 6 '18 at 14:57
0

app/design/frontend/Gssi/jewellery/Magento_Catalog/layout/override/base/catalog_product_view.xml

<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
      <referenceBlock name="product.info.review" remove="true" />
    </body>
</page>

Make sure you have registered and selected

custom theme from CONTENT->configuration

| improve this answer | |
  • yes ofcouse i did, i also re deploy it :( – fudu Oct 6 '18 at 15:16
0

Alright, so they use a special theme called porto, and i've to edit in admin to this work out :)
In porto->settings panel->product view
Thanks all for your help

| improve this answer | |
  • ohhh man :D lol – Aditya Shah Oct 8 '18 at 9:19
  • i know right :) but its hard to find, i cant figure it out if my leader didn't tell me :( – fudu Oct 8 '18 at 9:24
  • It's okay bro :) sometime it happens – Aditya Shah Oct 8 '18 at 9:28
  • No worries :) that's how we learn and grow ! :) – Aditya Shah Oct 8 '18 at 9:28
  • you're welcome :) – Aditya Shah Oct 8 '18 at 9:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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