- Posts: 75
- Thank you received: 1
Mass action CSV ok but not the action after that
-- 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
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
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.
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
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
Please Log in or Create an account to join the conversation.
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.
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.
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.
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
Please Log in or Create an account to join the conversation.
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.
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
Please Log in or Create an account to join the conversation.
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.
kind regards, Wilfried
Please Log in or Create an account to join the conversation.
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.
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.
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.
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.
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:
Please Log in or Create an account to join the conversation.
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
Please Log in or Create an account to join the conversation.
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.
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.