VirtueMart Forum

VirtueMart 2 + 3 => General Questions => Topic started by: Iryn3l on April 08, 2021, 12:35:49 pm

Title: The workflow for U or A is unknown, take a look on model/orders function handleS
Post by: Iryn3l on April 08, 2021, 12:35:49 pm
I discovered this error after the call of a client who did not receive the order by e-mail and did not reach my e-mail, and in the commands / VM I did not notice it
I recently changed the status A to L but at status U I didn't change anything other than editing its name

---
VirtueMart 3.8.4 10335
Joomla! 3.9.20
PHP 7.3
Title: Re: The workflow for U or A is unknown, take a look on model/orders function handleS
Post by: Jörgen on April 08, 2021, 12:41:25 pm
What is the stock handling for A and U in Your system ? In my case both are reserved.

Jörgen @ Kreativ Fotografi
Title: Re: The workflow for U or A is unknown, take a look on model/orders function handleS
Post by: Iryn3l on April 08, 2021, 13:13:42 pm
COM_VIRTUEMART_ORDER_STATUS_CONFIRMED_BY_SHOPPER >>> U >>> RESERVED
A that has become U is removed
but I don't use it anymore, it's for older orders, I just changed it to L (that's all)

One more question if we are still in this chapter, should I have only one status "Is Removed" and until then it should only be "reserved"?
Of course excluding these with return to stock.
Title: Re: The workflow for U or A is unknown, take a look on model/orders function handleS
Post by: Jörgen on April 08, 2021, 13:37:52 pm
You can not change U to L.

It is like changing You phone number. The old number will have no recipient. The phone number as order status is the key. You can change the content for the key. But changing the key erases the old key. I hope you get what I mean.
You can add L but do not remove U.

U or L are the keys U is still used in every location it is stored, orders and otherwise.

Jörgen
Title: Re: The workflow for U or A is unknown, take a look on model/orders function handleS
Post by: pinochico on April 08, 2021, 13:50:03 pm
Status U is used in lot of extensions and I think in core VM.

Why do you think you change it to your custom?

Then you have this result - mistake admin, done
Title: Re: The workflow for U or A is unknown, take a look on model/orders function handleS
Post by: Iryn3l on April 08, 2021, 15:30:38 pm
I changed "A" to "L", .... NOT "U" >>> Sorry for my mistake when I explained
I meant "A" that has become "L"  > stock handling is "RESERVED" for this
This "A" was a status that I created (it was not in the standard Vm created)
Title: Re: The workflow for U or A is unknown, take a look on model/orders function handleS
Post by: Jörgen on April 08, 2021, 16:38:08 pm
if you change A to L you will break keys. This will impact data already in your database. Trust me on this.

Please add L DO NOT DELETE A.

Jörgen
Title: Re: The workflow for U or A is unknown, take a look on model/orders function handleS
Post by: Iryn3l on April 09, 2021, 11:31:09 am
I recreated A and all the commands that were originally in this A status appeared here. In the meantime, I had noticed some errors, for example in mass invoicing, it generates invoices for very old orders.

Now I have another problem, I made a mistake
While switching bulk 26 orders, I forgot to select only the status I was interested in changing and closed the browser instinctively.


This status in which I wanted to change , sent the recipient contact details to a courier company and receives a transport code back.

I only sent for 6 out of 26 until the browser closes.
Trying to close I destroyed the database it seems and the orders from the last 24 hours or more I can't see them anymore


Can anything else be done to fix this?
You have some advice
Title: Re: The workflow for U or A is unknown, take a look on model/orders function handleS
Post by: AH on April 09, 2021, 12:28:06 pm
Dont ever delete an order status code

It causes many unexpected issues!

For example in order list - if the status is no longer available - it will show the order status as being the first in the order status list

Title: Re: The workflow for U or A is unknown, take a look on model/orders function handleS
Post by: Iryn3l on April 09, 2021, 12:51:18 pm
Yes now I noticed that it can create errors, I did not delete the status of the order I just renamed it .. I did not think that it can create the same errors as if it were deleted
Now it's solved after I re-created "A"

Can anyone  with the second problem, which has appeared in the meantime, help me with some advice?

<<<< Now I have another problem, I made a mistake
While switching bulk 26 orders, I forgot to select only the status I was interested in changing and closed the browser instinctively.
This status in which I wanted to change , sent the recipient contact details to a courier company and receives a transport code back.
I only sent for 6 out of 26 until the browser closes.
Trying to close I destroyed the database it seems and the orders from the last 24 hours or more I can't see them anymore >>>
Title: Re: The workflow for U or A is unknown, take a look on model/orders function handleS
Post by: Jörgen on April 09, 2021, 13:01:58 pm
Please notice, You do not rename it, you change the key value doing that. In practice this is the same as deleting the key and creating a new item. The item IS the key value with properties: reserved etc. The rest of the database does not understand that You have renamed it. The name is the KEY. Please understand this and You will know why you get into trouble.

All existing references to A will not find status A because it does not exist any more when "renamed" or deleted. Do never rename or delete a used status code.

Jörgen @ Kreativ Fotografi
Title: Re: The workflow for U or A is unknown, take a look on model/orders function handleS
Post by: AH on April 09, 2021, 13:54:11 pm
Changing the name - I was not aware of any issues regarding this?
Title: Re: The workflow for U or A is unknown, take a look on model/orders function handleS
Post by: Jörgen on April 09, 2021, 14:04:02 pm
@AH Changing the "name" of the key from A to L, is of course not the same as changing the descriptive name. Sorry about the confusion. Changing the descriptive name of the status "Cancelled" to Confirmed should not give any issues. I hope I cleared everything up.

Jörgen
Title: Re: The workflow for U or A is unknown, take a look on model/orders function handleS
Post by: Iryn3l on April 09, 2021, 14:15:35 pm
Now I understand, thank you for your help