R
R
Rolros2021-10-16 02:11:00
PHP
Rolros, 2021-10-16 02:11:00

Help finding a bug in a loop that doesn't pass the result of a variable to an XML feed?

I am writing an xml feed. This code is responsible for displaying the image. But for some reason it outputs nothing. Please help to display the url of the photo.

Looping an image to find a link to a photo

$images = '';

          foreach ($this->model_catalog_product->getProductImages($product['product_id']) as $image)

          {	if ($image['image']) {

              $link = $this->model_tool_image->resize($image['image'], $this->config->get($this->config->get('config_theme') . '_image_popup_width'), $this->config->get($this->config->get('config_theme') . '_image_popup_height'));

              $images .= '<image>' . $link . '</image>';

            }

          }


What forms the markup of the feed
$output .= '<images>'. $images . '</images>';

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question