Hi guys,
I have a layout update for my product view in Magento 2.2.4 where I want to display the attributes in different groups.
Currently I'm getting just some data, some attributes cannot be getting.In fact, I get the feeling that I can only get the configurable attributes.
<?php
$_helper = $this->helper('Magento\Catalog\Helper\Output');
$_product = $block->getProduct();
/* Demo Attributes */
$att_autonomia = $_product->getAttributeText('autonomia');
$weight = $_product->getData('weight');
$att_bateria = $_product->getAttributeText('bateria');
$att_carga_rapida = $_product->getAttributeText('carga_rapida');
$att_cpu = $_product->getAttributeText('cpu');
$att_gpu = $_product->getAttributeText('gpu');
$att_ram = $_product->getAttributeText('ram');
$att_rom = $_product->getAttributeText('rom');
$att_camara = $_product->getAttributeText('camara_trasera');
$att_memoria_sd = $_product->getAttributeCode('memoria_sd');
?>
Result:
How can I get the value of the attributes?