mass action for new and old products

  • Posts: 1119
  • Thank you received: 114
9 years 1 month ago #215363

Hi,

Could anyone tell me how to configure properly a mass action that adds every new product that I create in my 'New Products' Category and how to create a second mass action that will remove the product from this 'New Products' Category after 7 days... I have read mass action documentation, topics but couldn't find information how exacly to do this.
I dont want it to be try/look and restore from backup...
So i would appreciate if someone could help.

I have attached file what I have done right now but not sure is it good or not.

Thanks

Attachments:
Last edit: 9 years 1 month ago by kyratn.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 1 month ago #215364

Hi,

In the mass action, you can use the keyword

{time}
And also some operations like
{time}-25200
To get the timestamp of 7 days ago.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 1119
  • Thank you received: 114
9 years 1 month ago #215388

So I think I did what I want but could one of hika devs look into my pictures attached and tell me is it correct? I also have enabled cron task.

Update: add to product category seems to work, now question is about remove...

Attachments:
Last edit: 9 years 1 month ago by kyratn.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
9 years 1 month ago #215409

Hi,

It looks correct yes. If the cron task is properly setup you should see the products with their category added/removed every hour/day.

Note that you configured the add category mass action to be triggered once every hour, and the remove category once every day, so you might have to wait tomorrow to start seeing changes.

Last edit: 9 years 1 month ago by nicolas.

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

  • Posts: 517
  • Thank you received: 8
  • Hikashop Business
8 years 5 months ago #243706

Hi, I have been having a issue doing the same actions as here, the 'add' works ok but the 'remove' will not work?

I have done some digging and the error appears to be that when we create a new product, 99% of the time we 'copy' a product that has already been created thus if you see the attached, this contains 2 of the last two products created via 'copy' this week. Note that the 'created date' are not recent dates? I'm guessing this is causing the 'remove' issue? if this is the case how do we work around this (except by not using copy?)



below are my remove settings

Attachments:
Last edit: 8 years 5 months ago by mohairbears. Reason: additional info

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

  • Posts: 1119
  • Thank you received: 114
8 years 5 months ago #243720

Hi,

I can confirm that remove isnt working with this settings. We do copy some products too. Maybe it is related....

@mohairbears what i did to resolve it, i have added one more filter category_id and entered there my "new" category id like per this topic.

hikashop.com/forum/product-category-disp...85081-badge-new.html

It seems to work now.

Thanks

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

  • Posts: 517
  • Thank you received: 8
  • Hikashop Business
8 years 5 months ago #243721

Would that not remove the category? I just want to remove products from the category fro items created over 2 months?

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

  • Posts: 517
  • Thank you received: 8
  • Hikashop Business
8 years 5 months ago #243724

Ok tried this and it did work ok.

thanks

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

Time to create page: 0.091 seconds
Powered by Kunena Forum