Mass action CSV ok but not the action after that

  • Posts: 75
  • Thank you received: 1
9 years 3 months ago #187121

-- HikaShop version -- : 2.3.5
-- Joomla version -- : 3.3.6
-- Browser(s) name and version -- : latest IE, FF and Chrome

Hello,

I have made a massaction that when there is an update (confirmed) to an order that I want to produce a csv file for the packaging company and after the csv file is created I want the status to be changed to montapacking (see images).

When I created an order and when the order is payed (changed to confirmed) the csv file is being created automaticly so that is OK, but the status doesn't change to montapacking.

What am I doing wrong?



Example of order page. The last order is not changed to montapacking.


Kind regards Wilfried

Attachments:
Last edit: 9 years 3 months ago by wilfried. Reason: SOLVED

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

  • Posts: 75
  • Thank you received: 1
9 years 3 months ago #187129

O and when I click on Process (run the event manual) later on in the Massaction section on the same event the changed is changed.

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

  • Posts: 81604
  • Thank you received: 13082
  • MODERATOR
9 years 3 months ago #187143

Hi,

That should indeed work.
Try to use instead the "Update the values" action with the column "order_status", the type "text" and the value "monapacking" and maybe it will work better.

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

  • Posts: 75
  • Thank you received: 1
9 years 3 months ago #187202

I even tried both (defined right after each other) but I can't get it to work with the triggers as described in the picture above. I also tried it with a default status (shipping) but no luck either. The csv is being produced but the next action isn't triggered.

I now made an hourly trigger of it and that seems to work. It produced the csv and sets the statusses right. I can use that for the production site, but I preffer the triggers after creation.

Really strange. :S B)
Can someone explain why it doesn't work with the triggers above?




kind regards Wilfried
PS I renamed montapacking to "naar verzender" only for cosmetic purposes and that doesn't make any difference . Just in case someone sees that change :-)

Attachments:

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

  • Posts: 26019
  • Thank you received: 4005
  • MODERATOR
9 years 3 months ago #187208

Hi,

A trigger after the creation could be a little bit conflicted.
Because in the checkout the mass action is not the only one in place ; you have some payment plugins and other.
So the order status might have been modified by the mass action but this status can also be re-modified by another plugin.
Just look at the order history to be sure.

At this moment you can use the "after update" trigger.
But in most case I don't think that it will be a good idea to use a order trigger and change the order status.
Because you got the trigger "after create" ; why change the order status ?! It could be created with the right one ; you don't care. You do not need to change the order status at the creation.

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: 75
  • Thank you received: 1
9 years 3 months ago #187259

Thanks Jerome,

That is why I had set the trigger to After an order is Updated to completed, that indeed is set by the payment plugin. After payment (completed) I want to carry over the order to the packaging company. We do that with transporting a csv file to their ftp server. After the creation of the csv file I want to set a status that the order is carried over to the packaging company. So that orders won't be exported to csv anymore.

The strange thing is that with the situation above the csv is being created and the action after that isn't.

kind regards, Wilfried

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

  • Posts: 13201
  • Thank you received: 2322
9 years 3 months ago #187264

Hi,

I just tried on my local, and there is no issues, with the same settings than yours the order is exported and its status is well updated.
So as Jérome said, you potentially have another plugin which is using the same trigger and do changes on the order status.
Please try to change the position of the plugins to put the massaction_order one at the end of the queue.

If that still doesn't work, you can too try to disable the other plugins susceptible to change the order status one by one.

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

  • Posts: 75
  • Thank you received: 1
9 years 3 months ago #187384

Hello xavier,

Did you test it with the proceed button or did you actualy create an order that goes to confirmed after succesfull payment? I ask this because it works with the proceed button but not when is goes automatically.

I am pretty sure that I use the plugin that is in the plugin/hikashop/massaction_order directory because I change the php a bit. (name created with date in it) and the csv that is created is with the date name as changed.
I have also tested it with the original php code to be sure that I didn't make a mistake when changeing the php code.



Wilfried

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
9 years 3 months ago #187415

Hi,

I indeed tested by changing the order status in backend, so I just tried to proceed a common checkout on frontend and validate my order in frontend, no issues.

We now that the used plugin is this one, but we are talking about the plugin ordering ;)
In the plugin list, if this plugin is not the last one called, so another plugin can potentially manage the order status after this one, so please put this plugin at the end of the plugin list, this way it will be the latest called and the order status should be changed automatically.

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

  • Posts: 75
  • Thank you received: 1
9 years 3 months ago #187505

Hello Xavier,

First thanks for your patience :)

Ok I know what you mean, but what kind of plugin should be conflicting then. The payment plugin has done its work because of the fact that the order has the status confirmed isn't it?

I have placed the massaction order plugin to the last position and after testing it still doesn't work.



Kind regards, Wilfried

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
9 years 3 months ago #187511

Hi,

Please give us backend and ftp access in order to debug that issue directly on your website.
You can send the informations via private message or via out contact form.
In both cases, don't forget to give the url to that topic in the message.

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

  • Posts: 75
  • Thank you received: 1
9 years 3 months ago #187611

See PM.

kind regards, Wilfried

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

  • Posts: 13201
  • Thank you received: 2322
9 years 3 months ago #187647

Hi,

Are you sure that the path to save the file is a correct path ?
On the ftp I don't find the folder "/var/www/vhosts", this is maybe the source of the issue.

And what if you try to change the order status and then export the csv file, just change the actions order ?

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

  • Posts: 75
  • Thank you received: 1
9 years 3 months ago #187720

Hello Xavier,

Thanks for investigating.
Yes I am sure about the path. After all the csv is produced there. I took it from the log path settings in Joomla.
I already changed the order before but that didn't work.

kind regards, Wilfried

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

  • Posts: 13201
  • Thank you received: 2322
9 years 3 months ago #187778

Hi,

I have fixed the issue on your end, it seems to be working as expected now.
But I will do further investigations on my local to reproduce the issue, and make a better fix for the next release.

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

  • Posts: 75
  • Thank you received: 1
9 years 3 months ago #187799

That's great, thanks!!!

Is it possible to point out what you have changed so I know what the new code is when I change something else in the code?

Again Thanks!

kind regards, Wilfried

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

  • Posts: 13201
  • Thank you received: 2322
9 years 3 months ago #187802

Hi,

This fix is a temporary fix until I find the real origin of the issue.
But I have edited the file "administrator/component/com_hikashop/classes/massaction.php" function "process".
I have added code just after:

			foreach($massaction->massaction_actions as $k => $action){
				$this->report = array_merge($this->report,$this->dispatcher->trigger('onProcess'.ucfirst($massaction->massaction_table).'MassAction'.$action->name,array(&$elements,&$action->data,$k)));
			}

The following user(s) said Thank You: wilfried

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

  • Posts: 75
  • Thank you received: 1
9 years 3 months ago #189577

Hello Xavier,

After you made the adjustment ro the code the mail (with the invoice) telling the order has been confirmed is not being send. when I do the action right after an order has status completed. The status "naar verzender" has been set OK then.
When I do the hourly run the mail is being sent.

Hope this can be taken into account when changing the code.

kind regards, Wilfried

Last edit: 9 years 3 months ago by wilfried.

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

  • Posts: 13201
  • Thank you received: 2322
9 years 3 months ago #189624

Hi,

Ok thanks for this information, for the moment you should prefer the hourly mass action instead of the on status change one.
It will better, this way you are sure that all the tasks are executed.

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

  • Posts: 138
  • Thank you received: 1
8 years 10 months ago #204752

hi we use the same way of exporting our orders by a massaction. we also want after the download of the csv that the ordersvstatus changes from confirmend to send. We tried all above ways and it doesnt work. The csv file gets dpwnloaded but no action after tat works. We did try many other ones just to see if something worked.

Then we made a new massaction just for changing the order from confirmend to send. This works perfect.

Any idea why it doesnt work as a second action after we manually download de csv file?

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

Time to create page: 0.140 seconds
Powered by Kunena Forum