On a custom template I try to do the following calls:
$a = $this->getProduct()->getData('short_description');
$b = $this->getProduct()->getData()['short_description'];
$c = $this->getProduct()->getAttributeText('short_description');
$d = $this->getProduct()getShortDescription();
All of them return null, $this->getProduct() being a instance of Magento\Catalog\Model\Product. It works with other arguments though.
On the database, this argument has properties is_visible
and is_visibile_on_front
set to 1.
Additionally I tried setting the following block on the layout without using a custom template.
<block after="-" class="Magento\Catalog\Block\Product\View\Description" name="product.info.short_description" template="Magento_Catalog::product/view/attribute.phtml">
<arguments>
<argument name="at_call" xsi:type="string">getShortDescription</argument>
<argument name="at_code" xsi:type="string">short_description</argument>
</arguments>
</block>
Also tried to do a var_dump($this->getProduct()->getData()))
.
Short description was in place along other attributes and properties.
How to get the short description?