if ($product_info['image']) {
$data['popup'] = 'image/' . $product_info['image'];
} else {
$data['popup'] = '';
}
if ($product_info['image']) {
$data['thumb'] = 'image/' . $product_info['image'];
} else {
$data['thumb'] = '';
}
$data['images'] = array();
$results = $this->model_catalog_product->getProductImages($this->request->get['product_id']);
foreach ($results as $result) {
$data['images'][] = array(
'popup' =>'image/' . $product_info['image'],
'thumb' => 'image/' . $product_info['image']
);
}
'image' => 'image/' . $product_info['image'],
// Image
if (isset($this->request->post['image'])) {
$data['image'] = $this->request->post['image'];
} elseif (!empty($product_info)) {
$data['image'] = $product_info['image'];
} else {
$data['image'] = '';
}
if (isset($this->request->post['image']) && is_file(DIR_IMAGE . $this->request->post['image'])) {
$data['thumb'] = $this->model_tool_image->resize($this->request->post['image'], 100, 100);
} elseif (!empty($product_info) && is_file(DIR_IMAGE . $product_info['image'])) {
$data['thumb'] = $this->model_tool_image->resize($product_info['image'], 100, 100);
} else {
$data['thumb'] = $this->model_tool_image->resize('no_image.png', 100, 100);
}
$data['placeholder'] = $this->model_tool_image->resize('no_image.png', 100, 100);
$data['product_images'][] = array(
'image' => $image,
'thumb' => $this->model_tool_image->resize($thumb, 100, 100),
'sort_order' => $product_image['sort_order']
);
foreach ($results as $result) {
if (is_file(DIR_IMAGE . $result['image'])) {
$image = $this->model_tool_image->resize($result['image'], 40, 40);
} else {
$image = $this->model_tool_image->resize('no_image.png', 40, 40);
}