SwissUpLabs Logo

Product page additional blocks

  1. Attributepage block

Attributepage block


  1. This tutorial assumes that you already created custom theme based on one of Argento themes

    If you did not — go ahead, it will take 15 minutes.

  2. You should add images to all options of activity attribute too. Navigate to backend Swissup > Attribute Pages > Manage Pages for more information.

Let’s add Attributepages block that will show activity attribute.

  1. Create catalog_product_view.xml file in the following directory:

  2. Add the following content catalog_product_view.xml file and save it.

    <?xml version="1.0"?>
    <page xmlns:xsi=""
        <!-- Add block to the alert.urls container -->
        <referenceContainer name="alert.urls">
            <block class="Swissup\Attributepages\Block\Product\Option"
                    <argument name="attribute_code" xsi:type="string">activity</argument>
                    <argument name="use_image" xsi:type="boolean">true</argument>
                    <argument name="image_type" xsi:type="string">thumbnail</argument>
                    <argument name="width" xsi:type="number">50</argument>
                    <argument name="height" xsi:type="number">50</argument>
                    <argument name="use_link" xsi:type="boolean">true</argument>
                    <argument name="css_class" xsi:type="string">hidden-label</argument>

Clear Magento cache to see the result:

Attributepage widget on product page

Edit this Page