New Products Display For Set Time

  • Posts: 964
  • Thank you received: 11
  • Hikashop Business
11 years 11 months ago #79859

Whenever I add a NEW item I want that item to be displayed in the "new products" section for 7 days. After that it disappears from that section.

Is that possible and how would I do it if it is possible?

Thanks in advance!!

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
11 years 11 months ago #79942

Hi,

I think that when you're creating your product, you should just use the "Product available from/until" options.

Hope this will help you.

Please Log in or Create an account to join the conversation.

  • Posts: 964
  • Thank you received: 11
  • Hikashop Business
11 years 10 months ago #83617

Ok let me rephrase this.

I created a Badge called "NEW". I then created a category called "New Products". When I add a new product I want it to show the "New" badge icon, which it does now.

Where I'm confused is when I set the "New" badge to expire in 7 days does this means that if I add a new product on the 5th day it will only display as NEW for only 2 days?

So my question is, how do I get "NEW" products to ALWAYS display the "NEW" badge icon for 7 days.

Hope this is clearer in what I'm trying to achieve.

Thanks!!

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
11 years 10 months ago #83812

Hi,

The problem is that badges can be applied just to product's categories and not to products alone. So My solutions would be to :

1. Create a sub-category for each product
2. Create a new badge for each new product then this product will be displaid for 7 days

Hope this will help you.

Last edit: 11 years 10 months ago by Mohamed Thelji.

Please Log in or Create an account to join the conversation.

  • Posts: 964
  • Thank you received: 11
  • Hikashop Business
11 years 10 months ago #84177

The problem is that badges can be applied just to product's categories and not to products alone.
1. Create a sub-category for each product

OK I see what you mean but this solution would be way too tedious - especially if you have tons of new products.

It would be nice if badges could be used on products alone. Can this be added to the wish list?

Thanks!!

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 10 months ago #84397

Hi,

What you can do is edit the view "product / listing_img_title" and add a condition around the line: "$this->classbadge->placeBadges($this->image, $this->row->badges, -10, 0);"

Like:

if(($this->row->product_sale_start == 0 && $this->row->product_created >= time()-604800) || $this->row->product_sale_start >= time()-604800){
	$this->classbadge->placeBadges($this->image, $this->row->badges, -10, 0);
}
And apply the badge on all the products. You will have to do the same modification in the view "product / show_block_img".

Please Log in or Create an account to join the conversation.

  • Posts: 964
  • Thank you received: 11
  • Hikashop Business
11 years 10 months ago #84786

How will the badge be applied when I add a product? How do I add it to a specific product? Sorry I'm not clear about this part.

Thanks!!

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 10 months ago #84833

The badge will be applied on all the new products (less than 7 days). To add it to a specific product, you have to create a category apply a badge on it and add this category to your product.
Or you can create a custom field in the table product, and add a check for the badge display, like:

if((($this->row->product_sale_start == 0 && $this->row->product_created >= time()-604800) || $this->row->product_sale_start >= time()-604800) || $this->row->yourfield == 'show_badge'){
	$this->classbadge->placeBadges($this->image, $this->row->badges, -10, 0);
}

In this case, the badge will be displayed on the products published less than 7 days, or on the products with a value of "show_badge" for the custom field named "yourfield".

You can change the code to display the badge only on the recent products having the custom field value.

Please Log in or Create an account to join the conversation.

Time to create page: 0.081 seconds
Powered by Kunena Forum