In frontend the special end date

ThemeBurn SupportForumsOpenCart ThemesShoppica 2 OpenCart ThemeIn frontend the special end date

This topic has been marked as not resolved.

The question:
How can I display the date the sale/special ends on the product page?

Open: catalog/controller/product/product.php and find this code:
Code: Select all


$product_info = $this->model_catalog_product->getProduct($product_id);
Below it add this:
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));
$this->data[\'date_end\'] = \’\';

Now open: catalog/view/theme/default/template/product/product.tpl and find this:
Code: Select all

Make it look like this:
Code: Select all

Special Ends:

catalog/controller/product/product.php and find this code:
Code: Select all


$product_info = $this->model_catalog_product->getProduct($product_id);

This part can be traced

The problem is the shoppica 2 theme:
In catalog/view/theme/default/template/product/product.tpl you must change the code:

In the product.tpl in Shoppica 2 I found this code:

<meta itemprop=\"currency\" content=\"currency->getCode(); ?>\” />
priceFormat($price); ?>

priceFormat($special); ?>

and this piece of code:

<a href=\"\”>

<div class=\"s_price_holder s_size_common[\'price_size\']; ?> common[\'price_design\']; ?>\”>

priceFormat($product[\'price\']); ?>

priceFormat($product[\'price\']); ?>priceFormat($product[\'special\']); ?>

I am not a developer, so who can help me further.

This was a answer in the OC-forum:
The Shoppica theme developer might help you with that (since it is a commercial theme)

December 27, 2018 at 9:37 pm #66612


We will need the website url, admin and ftp access, so we can check. Please provide the OpenCart forum topic as well!

You can use hidepost to share private information with the support staff.

BR and happy New Year,
ThemeBurn team

January 4, 2019 at 9:48 am #66674
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.