You get a bonus - 1 coin for daily activity. Now you have 1 coin

How to make a placeholder for missing images in OpenCart (noimage)

Practice




how to make a placeholder for missing images in opencart (noimage)

in the file catalogcontrollerproductcategory.php

in the index action

instead of
$image =false;
foreach ($results as $result) {
if ($result['image']) {
$image = $this->model_tool_image->resize($result['image'], $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height'));
} else {
$image = $this->model_tool_image->resize('no_image.jpg', $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height'));

//$image =false;
}

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Running server side scripts using PHP as an example (LAMP)"

Terms: Running server side scripts using PHP as an example (LAMP)