If you follow my lead and don't rush through it this will give you exactly what you want.
Open: catalog/controller/product/product.php and find this code:
Below it add this:
Now open: catalog/view/theme/default/template/product/product.tpl and find this:
Make it look like this:
And there you have it. I tested on 1.5.2.1 + and works fine.
Open: catalog/controller/product/product.php and find this code:
Code: Select all
$this->load->model('catalog/product');
$product_info = $this->model_catalog_product->getProduct($product_id);
Code: Select all
$special_info = $this->db->query("SELECT date_end FROM " . DB_PREFIX . "product_special WHERE product_id = '" . (int)$product_id . "'");
if ($special_info->num_rows) {
$date_end = $special_info->row['date_end'];
$this->data['date_end'] = date($this->language->get('date_format_short'), strtotime($date_end));
}else{
$this->data['date_end'] = '';
}
Now open: catalog/view/theme/default/template/product/product.tpl and find this:
Code: Select all
<?php if (!$special) { ?>
<?php echo $price; ?>
<?php } else { ?>
<span class="price-old"><?php echo $price; ?></span> <span class="price-new"><?php echo $special; ?></span>
<?php } ?>
Code: Select all
<?php if (!$special) { ?>
<?php echo $price; ?>
<?php } else { ?>
<span class="price-old"><?php echo $price; ?></span> <span class="price-new"><?php echo $special; ?><br />Special Ends: <?php echo $date_end; ?></span>
<?php } ?>
Who is online
Users browsing this forum: No registered users and 58 guests