Skip to main content
Tweeted twitter.com/StackMagento/status/812332281314639872

iI add a Custom TEXT Attribute (more_info) to my Magento 2 Store and iI will show the Value to my product.info.main Page.

I add

mytheme\Magento_Catalog\layout\catalog_product_view.xml

mytheme\Magento_Catalog\layout\catalog_product_view.xml
<referenceBlock name="product.info.main">
    <block class="Magento\Catalog\Block\Product\View" template="product/view/more_info.phtml" >
    </block>
</referenceBlock>

and

mytheme\Magento_Catalog\templates\product\view\more_info.phtml

<?php $_product = $this->getProduct(); ?>
    <?php echo $_product->getAttributeText('more_info') ?>

but they show me no value  :-(

ImI'm very thankful for any help.

i add a Custom TEXT Attribute (more_info) to my Magento 2 Store and i will show the Value to my product.info.main Page.

I add

mytheme\Magento_Catalog\layout\catalog_product_view.xml
<referenceBlock name="product.info.main">
    <block class="Magento\Catalog\Block\Product\View" template="product/view/more_info.phtml" >
    </block>
</referenceBlock>

and

mytheme\Magento_Catalog\templates\product\view\more_info.phtml

<?php $_product = $this->getProduct(); ?>
    <?php echo $_product->getAttributeText('more_info') ?>

but they show me no value  :-(

Im very thankful for any help.

I add a Custom TEXT Attribute (more_info) to my Magento 2 Store and I will show the Value to my product.info.main Page.

I add

mytheme\Magento_Catalog\layout\catalog_product_view.xml

<referenceBlock name="product.info.main">
    <block class="Magento\Catalog\Block\Product\View" template="product/view/more_info.phtml" >
    </block>
</referenceBlock>

and

mytheme\Magento_Catalog\templates\product\view\more_info.phtml

<?php $_product = $this->getProduct(); ?>
    <?php echo $_product->getAttributeText('more_info') ?>

but they show me no value:-(

I'm very thankful for any help.

added 11 characters in body
Source Link
Rakesh Jesadiya
  • 42.4k
  • 19
  • 132
  • 184

i add a Custom TEXT Attribute (more_info) to my Magento 2 Store and i will show the Value to my product.info.main Page.

I add

mytheme\Magento_Catalog\layout\catalog_product_view.xml
<referenceBlock name="product.info.main">
    <block class="Magento\Catalog\Block\Product\View" template="product/view/more_info.phtml" >
    </block>
</referenceBlock>

and

mytheme\Magento_Catalog\templates\product\view\more_info.phtml

mytheme\Magento_Catalog\templates\product\view\more_info.phtml
<?php $_product = $this->getProduct(); ?>
    <?php echo $_product->getAttributeText('more_info') ?>

but they show me no value :-(

Im very thankful for any help.

i add a Custom TEXT Attribute (more_info) to my Magento 2 Store and i will show the Value to my product.info.main Page.

I add

mytheme\Magento_Catalog\layout\catalog_product_view.xml
<referenceBlock name="product.info.main">
    <block class="Magento\Catalog\Block\Product\View" template="product/view/more_info.phtml" >
    </block>
</referenceBlock>

and

mytheme\Magento_Catalog\templates\product\view\more_info.phtml
<?php $_product = $this->getProduct(); ?>
<?php echo $_product->getAttributeText('more_info') ?>

but they show me no value :-(

Im very thankful for any help.

i add a Custom TEXT Attribute (more_info) to my Magento 2 Store and i will show the Value to my product.info.main Page.

I add

mytheme\Magento_Catalog\layout\catalog_product_view.xml
<referenceBlock name="product.info.main">
    <block class="Magento\Catalog\Block\Product\View" template="product/view/more_info.phtml" >
    </block>
</referenceBlock>

and

mytheme\Magento_Catalog\templates\product\view\more_info.phtml

<?php $_product = $this->getProduct(); ?>
    <?php echo $_product->getAttributeText('more_info') ?>

but they show me no value :-(

Im very thankful for any help.

Source Link

Magento 2, add Custom Text Attribute to the Products

i add a Custom TEXT Attribute (more_info) to my Magento 2 Store and i will show the Value to my product.info.main Page.

I add

mytheme\Magento_Catalog\layout\catalog_product_view.xml
<referenceBlock name="product.info.main">
    <block class="Magento\Catalog\Block\Product\View" template="product/view/more_info.phtml" >
    </block>
</referenceBlock>

and

mytheme\Magento_Catalog\templates\product\view\more_info.phtml
<?php $_product = $this->getProduct(); ?>
<?php echo $_product->getAttributeText('more_info') ?>

but they show me no value :-(

Im very thankful for any help.