Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Recommended Posts

Warning: Invalid argument supplied for foreach() in /home/icrediti/public_html/ozama.ru/catalog/controller/module/product_tab.php on line 34 вот такая ошибка вылезла 


foreach ($latest_results as $result) {
            if ($result['image']) {
                $image = $this->model_tool_image->resize($result['image'], $setting['image_width'], $setting['image_height']);
            } else {
                $image = $this->model_tool_image->resize('no_image.jpg', $setting['image_width'], $setting['image_height']);
            if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {
                $price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax')));
            } else {
                $price = false;
            if ((float)$result['special']) {
                $special = $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax')));
            } else {
                $special = false;
            if ($this->config->get('config_review_status')) {
                $rating = $result['rating'];
            } else {
                $rating = false;
            $this->data['latest_products'][] = array(
                'product_id' => $result['product_id'],
                'thumb'        => $image,
                'name'         => $result['name'],
                'price'        => $price,
                'special'      => $special,
                'saving'     => ((float)$result['price'] ? round((($result['price'] - $result['special'])/$result['price'])*100, 0) : 0),
                'rating'     => $rating,
                'reviews'    => sprintf($this->language->get('text_reviews'), (int)$result['reviews']),
                'href'         => $this->url->link('product/product', 'product_id=' . $result['product_id']),


Что не так?

Link to comment
Share on other sites

Вам прямо в ошибке написано, что классе объявлен пустой массив. Что в модели по поводу $latest_results?

Лучше обратиться к автору модуля наверное.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.