Post by wiznia » Thu Jun 06, 2013 8:38 am

Hi guys! I'm new to Opencart and I'm theming a template in which I need to have a custom "New offer" and "New product" label if the product is checked as offer or new on the admin. So far, I managed to do this on the single product view following this tutorial: http://forum.opencart.com/viewtopic.php?t=36625, so I already have those two values added to the "product" table.

But now when I try to replicate the same for the product grid (the one that shows a list of products) it doesn't work so I think maybe I'm modifying the wrong files.

I was following this topic that seemed to be the same as what I intended but with no luck: http://forum.opencart.com/viewtopic.php?t=54524

These are the steps I did:

- Added:

Code: Select all

$this->data['entry_newoffer'] = $this->language->get('entry_newoffer');
to category.php on /catalog/controller/product/

- Also added:

Code: Select all

 'newoffer'  => $result['newoffer']
to this array on the same file:

Code: Select all

$this->data['products'][] = array(
- Added language files newoffer on /catalog/language/english/category.php:

Code: Select all

 $_['text_newoffer'] = 'New Offer!';
- Added the code on the template file on /catalog/view/theme/default/template/product/category.tpl:

Code: Select all

<?php if($product['newoffer']){ ?>
 show something
<?php } ?>
Any help will be really appreciated!

BTW I'm using Opencart v1.5.3

Thanks!

Newbie

Posts

Joined
Thu Jun 06, 2013 8:21 am

Post by wiznia » Fri Jun 14, 2013 1:02 pm

Anyone? please :)

Newbie

Posts

Joined
Thu Jun 06, 2013 8:21 am

Post by onoriotorti » Mon Sep 25, 2017 4:37 pm

Did anybody ever find a solution for this?

New member

Posts

Joined
Tue Jun 20, 2017 5:36 pm
Who is online

Users browsing this forum: No registered users and 35 guests