1

I would like to add additional information to specified products, we would like to use the block as a template where we would just need to add this block to the product content so it would appear without problem in the products we desire.

This is the block:

enter image description here

Here is the product content:

enter image description here

But it doesn't show up after the text we already have:

enter image description here

We would like this to not be programatically, so someone who doesn't have acces to the code, only to the magento website can manage to make all the changes needed.

3
  • No, I mean using the backend only, the Magento configuration. You can't do much stuff on the frontend. But I say that in the title because there must be a way to do it programatically, but it doesn't suit what I need.
    – Raül
    Commented Aug 29, 2018 at 11:12
  • so basically you want to show the block into the tab of product page right?
    – Ruhani
    Commented Aug 29, 2018 at 11:13
  • Either inside the tab or under. Once I know how to call it there I will adjust as I need.
    – Raül
    Commented Aug 29, 2018 at 11:14

1 Answer 1

3

Below extension might help you if you don't want to do it programmatically.

https://ecommerce.aheadworks.com/magento-2-extensions/custom-static-blocks/

However just in case if you want to do it programmatically, it can be done by below.

Navigate to: Magento_Catalog/layout/catalog_product_view.xml and call the block there as below

<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.details">
        <block class="Magento\Cms\Block\Block" name="product.extraproduct.tab" as="extraproduct.tab" group="detailed_info" >
            <arguments>
                <argument translate="true" name="title" xsi:type="string">extra product</argument>
                <argument name="block_id" xsi:type="string">extra_product</argument>
            </arguments>
        </block>
      </referenceBlock>
    </body>
 </page>

Flush the cache once done

php bin/magento cache:flush

6
  • I just told you that I can't do it programatically, it doesn't suit what I need. Thank you for your answer but it's not what I ask for.
    – Raül
    Commented Aug 29, 2018 at 11:33
  • without calling a static block in file, how magento can identify where you need to put it? anyways I don't think what you ask for is possible without doing a code
    – Ruhani
    Commented Aug 29, 2018 at 11:35
  • It might not be possible but I just want to ask if someone has done it earlier, or knows how, or knows about a extension or whatever :D
    – Raül
    Commented Aug 29, 2018 at 11:39
  • 1
    May be this can help ecommerce.aheadworks.com/magento-2-extensions/…
    – Ruhani
    Commented Aug 29, 2018 at 11:54
  • Answer with the extension, I will accept it.
    – Raül
    Commented Aug 29, 2018 at 12:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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