If you want to display brand attribute value in the product view page, You can use the following code:
1 2 3 4 5 6 7 8 9 10 11 |
<referenceContainer name="product.info.main"> <block class="Magento\Catalog\Block\Product\View\Description" name="product.info.brand" template="product/view/attribute.phtml" before="-"> <arguments> <argument name="at_call" xsi:type="string">getBrand</argument> <argument name="at_code" xsi:type="string">brand</argument> <argument name="css_class" xsi:type="string">brand</argument> <argument name="at_label" xsi:type="string">none</argument> <argument name="add_attribute" xsi:type="string">itemprop="brand"</argument> </arguments> </block> </referenceContainer> |
Also If you need to display text before this attribute value in the product page something like:
Brand: Apple
For that you need to change ‘none’ to ‘default’ as shown below in ‘at_label’ :
From:
1 |
<argument name="at_label" xsi:type="string">none</argument> |
To:
1 |
<argument name="at_label" xsi:type="string">default</argument> |
Now you can see product attribute value with it’s label in the product page.
If you want get query string params in controller file,...
Create di.xml and add the below code Magemonkey/Redirect/etc/frontend/di.xml [crayon-628468ff91098180514193/] Create...
You can try below code to change local date to...
Step 1: First you need to add registration.php file in...
Step1 : Override message.js in current theme file on the...