The array is defined and accessible.

в model/catalog/product.php в public function getProduct($product_id) { array(); 

as soon as I did not try to determine it in the controller and call it in tpl - nothing Tell me please how?

    1 answer 1

    In the model catalog / model / catalog / product.php

     public function getMyProductData() { $my_product_data = array(); ... return $my_product_data; } 

    In the catalog / controller / product / product.php controller

     $data['my_product_data'] = $this->model_catalog_product->getMyProductData(); 

    In the pattern

     <?php foreach ($my_product_data['value'] as $value) { ?> <tr> <td><?php echo $value['name']; ?></td> <td><?php echo $value['text']; ?></td> </tr> <?php } ?>