help in badges and mass action.

  • Posts: 490
  • Thank you received: 2
7 years 7 months ago #252619

-- HikaShop version -- : 2.6.3
-- Joomla version -- : 1.7.0
-- PHP version -- : 5.5
-- Error-message(debug-mod must be tuned on) -- : none

hi
i created a badge for new products. for the category i created a category named "new products" which is empty. The new product category is root and not a sub of products or anything. i dont know if this is correct.

screen shot below for the badge i created



i created a mass action to add the products to the new category if it falls under 30 days of product publishing. note not product created.



this is the mass action to remove them from the new category after 30 days or >=31 days



i got the badge to appear but it appears on all products. the remove isnt worrking.

please guide me

thanks

Attachments:

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

  • Posts: 81677
  • Thank you received: 13102
  • MODERATOR
7 years 7 months ago #252640

Hi,

product_published can only have the value 1 or 0. 1 for when the product is published and 0 when it is unpublished.

So what you're describing is normal since your mass actions do that:
- if the product_published value is lower than 30 (which is the case for all the products) add the products to that category
- if the product_published value is bigger than 30 (which is the case for none of the products) remove the products from that category

So the problem is with your filter which is wrong.
Instead, you want to use the product_created column and compare it to such value: {time}-2592000
2592000 is the number of seconds in 30 days.

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

  • Posts: 490
  • Thank you received: 2
7 years 7 months ago #252730

hi

i cant get it to work. i followed your settings and even changed it to a week or 604800 sec. When i click on process all products will have a badge of new

this is the configuration. Is it correct?



thanks

Attachments:

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

  • Posts: 81677
  • Thank you received: 13102
  • MODERATOR
7 years 7 months ago #252781

Hi,

It's still not correct.
What you set means:
"for all the products with a creation date after 604800 seconds after the 1st of January 1970".
As I said, in my previous post, you should use {time}-604800 which would instead mean:
"for all the products with a creation date after now - 604800 seconds".

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

  • Posts: 490
  • Thank you received: 2
7 years 7 months ago #252864

thanks

Last edit: 7 years 7 months ago by ronron.

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

  • Posts: 490
  • Thank you received: 2
7 years 6 months ago #253240

hi

is there a way do an "OR" comparison instead of "AND"?

please see the example below.

what i want is something like

if custom_field = 4 update category to "new category"
if custom_field = 5 update category to "new category"
if custom_field = 6 update category to "new category"

mass action uses "and" can we use "or"



thanks

Attachments:

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

  • Posts: 81677
  • Thank you received: 13102
  • MODERATOR
7 years 6 months ago #253259

Hi,

No but instead of : if x = 4 OR x = 5 OR x = 6
You can do: if x >= 4 AND x <= 6
and that is possible.

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

Time to create page: 0.095 seconds
Powered by Kunena Forum