Question

My array,

array (
  'store_hours' => 
  array (
    'entity_id' => '7',
    'attribute_id' => '2',
    'store_id' => '4',
    'value' => 'Mon-Fri: 10am - 8 pm',
    'frontend_label' => 'Store Hours',
    'attribute_code' => 'store_hours',
    'frontend_input' => 'text',
    'is_required' => NULL,
    'label_serialized' => '{"1":"Store Hours"}',
    'options_serialized' => NULL,
    'value_id' => NULL,
    'option_title' => 'Mon-Fri: 10am - 8 pm',
  ),
)

How to print store hours : Mon-Fri: 10am - 8 pm

My declaration :

'store_hours' =>$this->getDataByKey('store_hours')->getDataByKey('value');

Its not return the values.

No correct solution

OTHER TIPS

Try this :-

$storeData = $this->getDataByKey('store_hours');

$storeHours = $storeData['value'];

'store_hours' => $storeHours;
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top