[Skip to main content](#vessel-content)

#   badge "new"

##

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86584
- Thank you received: 14325
-
-

9 years 9 months ago [\#262403](#262403) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[badge "new"](/forum/26-product-category-display/885081-badge-new?start=20#262403 "Hi. How can i set x days to show NEW badge from the published date of the product? After these days are passed the badge won't be displayed. It seems i cannot do that. Best regards")*

Hi,

So it looks like your cron task is running.
So I've reviewed the whole thread as I didn't know about that ultimo_aggiornamento field.
And I found out that it was a custom product field of the type "advanced date picker".
Your problem is actually with that.
The mass actions system will compare dates using the unix timestamps (number of seconds from the 1st of January 1970).
So when you write {time} - 5184000, it will take the current date in unix timestamp, substract 5184000 and you'll get something like that: 1487152952 - 5184000 = 1481968952
And then, the system will add the condition ultimo_aggiornamento &lt; 1481968952 in the query to get all the products matching.
However, advanced date picker fields do not store their date in unix timestamp. They use another format which is adapted in order to run the algorithm for all the restrictions of these custom fields. And thus, the condition will always be wrong and thus it won't give back any product.
That's why you think the mass action doesn't work.
If you were using the product_created or product_modified field instead of a custom field, the mass action would work as the column would also use the unix timestamp format.
Thus, in your case, a mass action with a custom product field of the type advanced date picker is not possible.
But from what I understand, you're selecting in that custom field the last time the product was updated, which is what the product_modified column already does automatically. So why not simply use that column in your mass action and get ride of that custom field ? It would be less hassle to manage, and the mass action would work fine.

The following user(s) said Thank You: [french150](/forum/user/17940-french150 "View french150's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODUwODEtYmFkZ2UtbmV3P3N0YXJ0PTIwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[french150](/forum/user/17940-french150 "View french150's Profile")**
- [![french150's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/17940-french150 "View french150's Profile") Topic Author
- [ Offline](/forum/user/17940-french150)

Less More

- Posts: 106
- Thank you received: 0
-
-

9 years 9 months ago [\#262496](#262496) by [french150](/forum/user/17940-french150 "View french150's Profile")  Replied by *[french150](/forum/user/17940-french150 "View french150's Profile")* on topic *[badge "new"](/forum/26-product-category-display/885081-badge-new?start=20#262496 "Hi. How can i set x days to show NEW badge from the published date of the product? After these days are passed the badge won't be displayed. It seems i cannot do that. Best regards")*

So i use product_created for manage mass action to remove or add "new" badge and product_modified about "updated" badge.
Thanks.
Best regards

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODUwODEtYmFkZ2UtbmV3P3N0YXJ0PTIwJnRtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.054 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
