Идем в \catalog\model\catalog\
открываем файл - product.php
Ищем функцию - getProductDiscount() и запрос в ней
$query = $this->db->query("SELECT price FROM " . DB_PREFIX . "product_discount WHERE product_id = '" . (int)$product_id . "' AND customer_group_id = '" . (int)$customer_group_id . "' AND quantity = '1' AND ((date_start = '0000-00-00' OR date_start < NOW()) AND (date_end = '0000-00-00' OR date_end > NOW())) ORDER BY priority ASC, price ASC LIMIT 1");
Изменяем его на
$query = $this->db->query("SELECT price,date_end FROM " . DB_PREFIX . "product_discount WHERE product_id = '" . (int)$product_id . "' AND customer_group_id = '" . (int)$customer_group_id . "' AND quantity = '1' AND ((date_start = '0000-00-00' OR date_start < NOW()) AND (date_end = '0000-00-00' OR date_end > NOW())) ORDER BY priority ASC, price ASC LIMIT 1");
Ниже
if ($query->num_rows) {
return $query->row['price'];
} else {
return FALSE;
}
Изсеняем на
if ($query->num_rows) {
return $query->row;
} else {
return FALSE;
}
Ищем функцию getProductSpecial()
ищем
$query = $this->db->query("SELECT priceFROM " . DB_PREFIX . "product_special WHERE product_id = '" . (int)$product_id . "' AND customer_group_id = '" . (int)$customer_group_id . "' AND ((date_start = '0000-00-00' OR date_start < NOW()) AND (date_end = '0000-00-00' OR date_end > NOW())) ORDER BY priority ASC, price ASC LIMIT 1");
if ($query->num_rows) {
return $query->row['price'];
} else {
return FALSE;
}
Меняем на
$query = $this->db->query("SELECT price,date_end FROM " . DB_PREFIX . "product_special WHERE product_id = '" . (int)$product_id . "' AND customer_group_id = '" . (int)$customer_group_id . "' AND ((date_start = '0000-00-00' OR date_start < NOW()) AND (date_end = '0000-00-00' OR date_end > NOW())) ORDER BY priority ASC, price ASC LIMIT 1");
if ($query->num_rows) {
return $query->row;
} else {
return FALSE;
}
Идем в \catalog\controller\product\product.php
Ищем
if ($discount) {
$this->data['price'] = $this->currency->format($this->tax->calculate($discount, $product_info['tax_class_id'], $this->config->get('config_tax')));
$this->data['special'] = FALSE;
} else {
$this->data['price'] = $this->currency->format($this->tax->calculate($product_info['price'], $product_info['tax_class_id'], $this->config->get('config_tax')));
$special = $this->model_catalog_product->getProductSpecial($this->request->get['product_id']);
if ($special) {
$this->data['special'] = $this->currency->format($this->tax->calculate($special, $product_info['tax_class_id'], $this->config->get('config_tax')));
} else {
$this->data['special'] = FALSE;
}
}
Меняем на
if ($discount) {
$this->data['price'] = $discount['price'];
$this->data['descount_date_end'] = date($this->language->get('date_format_short'), strtotime($discount['date_end']));
$this->data['special'] = FALSE;
} else {
$this->data['price'] = $product_info['price'];
$special = $this->model_catalog_product->getProductSpecial($this->request->get['product_id']);
if ($special) {
$this->data['special'] = $special['price'];
$this->data['special_date_end'] = date($this->language->get('date_format_short'), strtotime($special['date_end']));
} else {
$this->data['special'] = FALSE;
}
}
Открываем фаблон вывода и в нужные места вставляем переменные
$descount_date_end - это дата окончания скидки
$special_date_end - это дата окончания спец предложения
Вроде все! Но если у тебя выводится модуль АКЦИИ и страница АКЦИИ, то в контроллере, может нужно будет сделать изменения...