Welcome, Guest
Username: Password: Remember me
Use this Category for your support questions about Virtuemart Template - PureMart (SKU# FLEX-00010)

TOPIC: [SOLVED] how to hide 'new' label in category page

[SOLVED] how to hide 'new' label in category page 11 years 6 months ago #680

hi, just purchased the template: really great!
just a question: I checked not to display the new product in configuration, and the label still appears.

Use vm 2.0.12 on J2.5.7
flexv2 category
flexv2 product

thanks, nicola
Last Edit: 11 years 6 months ago by Support.
The topic has been locked.

'new' label in category layout 11 years 6 months ago #691

Hi,

The configuration setting you have "unchecked" is not for NEW label (icons)
That settings is for: either you want to show the new products in the Virtuemart front page or Not.

If you want to hide the "NEW ICONS" from "category browse page" you would need a little coding changes. You would need PHP coding changes because this feature doesn't come with original Virtuemart, it is part of our VM Template.

By default, the time period is set to "1 week". The time period is based on the product creation date. So, it will have "new icon" for 1 week after it is created. To eliminate this;

open this PHP file:
ROOT/templates/<yourjoomlatemplate>/html/com_virtuemart/category/flexv2.php
(flexv2.php, default.php, flexv2list.php or which ever layout you are using for your "category browse page layout")

And look for this PHP line:
$createddate = strtotime(($product->created_on) . " +1 week");

You will find this line in 3 different places (as category pages have 3 different VIEWs: ListView, GridView, MultiGridView)

And change this line with this:
$createddate = strtotime(($product->created_on) . " +1 minute");

Or even you can make it +1 second
Which means; the products will have the "new icon" when it is created and the icon will be gone after 1 minute /or/ 1 second.

Clear enough?

Cheers.
Last Edit: 11 years 6 months ago by Support.
The topic has been locked.

'new' label in category layout 11 years 6 months ago #727

got it
really clear and clever too

many thanks: your template is a great job
The topic has been locked.

'new' label in category layout 11 years 6 months ago #739

your welcome.

Case solved. Topic is closed.
The topic has been locked.
Time to create page: 0.122 seconds

MaterialMart

for Virtuemart 3

Google's Material Design has finally arrived to Virtuemart

Virtumart Template - MaterialMart Virtumart Template - CleanMart Virtumart Template - CleanMart Virtumart Template - CleanMart

Fully responsive!

Buy Now   |   Live Demo