Update only stock of existing products csv file

  • Posts: 267
  • Thank you received: 5
2 years 7 months ago #340525

Thank you very much as always Nicolas,
I have tried point b) and it works correctly and it has helped me a lot.

Regarding what you tell me about: "That way, if you run these mass actions one after the other, you'll have what you want.
The problem is then automating that, if you need to do that task periodically. Because there is no mechanism to set an order on the mass actions, or to say to run another mass action after one. That would require a bit of coding."

It's what I wanted to ask you about later, but since you bring up the subject I'll tell you right here. Perhaps what I am saying does not make sense, but I would like to know if the following can be done:

It is to put at the end of each massaction a Run SQL query that unpublishes the current task and activates the next one, in this way the massactions could be ordered and then the frequency of the cron could be played with.

Would this solution be viable, if so, could you tell me what the sql query would be like to perform some tests?

Thank you very much again and best regards.

Last edit: 2 years 7 months ago by dvddvd.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 7 months ago #340526

Hi,

That's a creative way to look at it. I hadn't thought about this.
I think it would work yes. However, you'll need to have two "run MySQL query" actions in each massaction, one to unpublish the current mass action, and one to publish the next one.
The queries would be quite simple:

UPDATE #__hikashop_massaction SET massaction_published = 0 WHERE massaction_id = XX;
where XX is the id of the massaction you want to target. And you can change the 0 to a 1 to publish a massaction instead of unpublishing it.

Last edit: 2 years 7 months ago by nicolas.
The following user(s) said Thank You: dvddvd

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

  • Posts: 267
  • Thank you received: 5
2 years 7 months ago #340658

Thank yoy Nicolas, it works perfectly!!!

The following user(s) said Thank You: nicolas

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

Time to create page: 0.060 seconds
Powered by Kunena Forum