Это наверное сюда
Страшно тупит магазин, ну в общем как обычно
смотрим на безобидную добавку
// BOF - Zappo - ImagEngine - TWO LINES - Add image Add-Ons (Pass 'product' here, to avoid 'category' being detected)
$addon = $this->model_tool_image->getImageAddon($result['product_id'], $result['special']);
$image = $this->model_tool_image->resize($result['image'], 'product', 0, $addon);
ну да, стикер какой-то
заглянем в tool/image
public function getImageAddon($id, $special) {
$addon = array('addon' => array());
if (!$id) return $addon;
if ($this->customer->isLogged()) {
$customer_group_id = $this->customer->getGroupId();
} else {
$customer_group_id = $this->config->get('config_customer_group_id');
}
$limit = $this->config->get('config_bestseller_limit');
if (!$limit) $limit = 20;
$query = $this->db->query("SELECT op.product_id, COUNT(*) AS total FROM " . DB_PREFIX . "order_product op LEFT JOIN `" . DB_PREFIX . "order` o ON (op.order_id = o.order_id) LEFT JOIN `" . DB_PREFIX . "product` p ON (op.product_id = p.product_id) LEFT JOIN " . DB_PREFIX . "product_to_store p2s ON (p.product_id = p2s.product_id) WHERE o.order_status_id > '0' AND p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '" . (int)$this->config->get('config_store_id') . "' GROUP BY op.product_id ORDER BY total DESC LIMIT " . (int)$limit);
foreach ($query->rows as $result) {
if ($id == $result['product_id']) {
$addon['addon'][] = 'bestseller';
break;
}
}
$limit = $this->config->get('config_latest_limit');
if (!$limit) $limit = 20;
$query = $this->db->query("SELECT p.product_id FROM " . DB_PREFIX . "product p LEFT JOIN " . DB_PREFIX . "product_to_store p2s ON (p.product_id = p2s.product_id) WHERE p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '" . (int)$this->config->get('config_store_id') . "' ORDER BY p.date_added DESC LIMIT " . (int)$limit);
foreach ($query->rows as $result) {
if ($id == $result['product_id']) {
$addon['addon'][] = 'latest';
break;
}
}
if ($special) $addon['addon'][] = 'specials';
return $addon;
}
занавес