Discussions

Mark a product as new..

After adding a new product in drupal commerce, How can we mark it as new?????

Tags: 
Posted: May 18, 2013

Comments

CptAnt on May 18, 2013

Through views you could filter your products by date created or if you wanted to isolate specific products add an extra field to mark it as new. The second method removes any automation benefits you would get from using date created.

jyoti on May 21, 2013

Thanks for reply but
Iam new in drupal & i don't have much knowledge about druoal..
Can you explain how we mark a product as new using a field & after some time new tag is removed...

CptAnt on May 25, 2013

Add a boolean field to the product display. Hide it in for the product displays as you don't want it showing on the product display client side. Highlight the field for the products you want classified as new. You can then filter on this in views. If you check out the existing views for listing products you should be able to figure out how to modify one to suit your requirements.

jyoti on May 27, 2013

Thanks for reply...
but how can we remove that new field from product after some time ..
Can you elaborate the steps of marking the product as new...

My requirement is similar to the default functionality of drupal .. when we create a content then a new tag is arrive in back-end in front of that content & after sometime that tag automatically removed from content... can you please explain that how can i achieve that functionality,, when i add a new product then in front-end a new tag is visible on that product...

Thanks,

CptAnt on May 29, 2013

If you want that functionality out of the box used the created date of the node to filter. Just use a date range to filter in the view.

If you want to use a specific field to mark the product as new then you have two options. Manually update it or write a module to do it for you.

To hide the field on the front end just mark it as hidden for the displays on which you don't want it seen.