1. roderic
  2. RO CSVI
  3. Wednesday, 19 January 2022
  4.  Subscribe via email
Hi, again,

In the weekend I made an import to update the status of orders that Vendit is reporting. I got this working but today I found out it's only updating the Order but the products in that order remain unchanged, thus keeping the "Reserved" status. Showing some products as unavailable although they are actually in stock.

When I manually change the status to "Shipped", the status of the products is also changed. So when running the import, this trigger is missing?

Update:

Example of the import:

order-update.jpg


Cheers
Attachments (1)
Accepted Answer Pending Moderation
Hello,
When I manually change the status to "Shipped", the status of the products is also changed. So when running the import, this trigger is missing?

Yes, we do not update order product status in VirtueMart Order import when order status is changed. You can change the order product status using VirtueMart Order item import.

We have added the feature of updating order product status when order status is changed to our todo list. There is no ETA on when this will be added but will be developed and included in future release.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 1
Accepted Answer Pending Moderation
Hi Tharuna,

You can change the order product status using VirtueMart Order item import.


Yes I figured this but the problem is that the XML file I'm getting back from Vendit with Statusupdates, doesn't contain the products.

We have added the feature of updating order product status when order status is changed to our todo list. There is no ETA on when this will be added but will be developed and included in future release.


That'd be great.

Cheers
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hello Roderic,
Yes I figured this but the problem is that the XML file I'm getting back from Vendit with Statusupdates, doesn't contain the products.

That is the problem. For VirtueMart Order item import order_item_sku and order_number are needed fields. Without order_item_sku RO CSVI will not know which product to update.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 3
Accepted Answer Pending Moderation
Hi Tharuna,

Why was this marked as solved? Am I missing something?

Cheers
  1. more than a month ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
Hello Roderic,
You are not missing anything. The posts which are 2 weeks old are set to resolved. We have issue created in our todo list with this thread as reference so when the patch is ready it will be sent to you.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 5
Accepted Answer Pending Moderation
Hello,

I would really like to see this functionality added as I have to update the orders myself every day so the stock stays correct.

A related issue:

I've set up a cron that updates the order status every 15 minutes. But even when the status remains the same, it will add another entry, leading to enormous lists:

Order-updates.jpg


Now this wouldn't be an issue when the file that's imported only contains the orders that are changed. (Like it would probably be in most cases.) Unfortunately that's not the case and this is also not something I can change in Vendit.



Perhaps these 2 things could be fixed in one patch?
Attachments (1)
  1. more than a month ago
  2. RO CSVI
  3. # 6
Accepted Answer Pending Moderation
Hello Roderic,
I would really like to see this functionality added as I have to update the orders myself every day so the stock stays correct.

With the attached patch file when the status of the order changes status of products related to that order also changes. Load the patch file and run the import. Let me know on how that goes.

I've set up a cron that updates the order status every 15 minutes. But even when the status remains the same, it will add another entry, leading to enormous lists:

That is the log history VirtueMart maintains on the changes made to order status. You can see the date and time are different for each entry in the log. You can manually change the status of the order to see VirtueMart creating new entries and does not update existing rows even though order status is same. See attached screenshot.
Attachments (2)
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 7
Accepted Answer Pending Moderation
Hello Tharuna,

I've installed the patch and the status of the product in the order now changes:
order-item-updated.jpg

However, it doesn't update the reserved/booked count for that product like it should and does when manually updating the status. So, halfway there I would say?

That is the log history VirtueMart maintains on the changes made to order status. You can see the date and time are different for each entry in the log. You can manually change the status of the order to see VirtueMart creating new entries and does not update existing rows even though order status is same. See attached screenshot.


I'm aware. The problem to this: The table order_histories grows very big and when you view an older order, you have to scroll down a lot because the list is very long.

Possible solutions:

1. The order status import checks if the status is already the one that's being imported. If yes, it ignores it.
2. In the template there is this field: modified_on. There could be an option in the template that only looks at a status that is modified since last run or today (or any other date setting someone chooses in their template settings). Just like you can when exporting Orders:

order-template-options.jpg


Cheers
Attachments (2)
  1. more than a month ago
  2. RO CSVI
  3. # 8
Accepted Answer Pending Moderation
Hello Roderic,
However, it doesn't update the reserved/booked count for that product like it should and does when manually updating the status. So, halfway there I would say?

Where is this reserved/booked count? Can you post a screenshot on where you see it in VirtueMart? Also please explain on how the order status would affect the reserved/booked count.

I'm aware. The problem to this: The table order_histories grows very big and when you view an older order, you have to scroll down a lot because the list is very long.

Possible solutions:

1. The order status import checks if the status is already the one that's being imported. If yes, it ignores it.
2. In the template there is this field: modified_on. There could be an option in the template that only looks at a status that is modified since last run or today (or any other date setting someone chooses in their template settings). Just like you can when exporting Orders:

Will look into this and get back to you.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 9
Accepted Answer Pending Moderation
Hello,

Where is this reserved/booked count? Can you post a screenshot on where you see it in VirtueMart? Also please explain on how the order status would affect the reserved/booked count.


Virtuemart -> Products -> Product -> Product Satus:


product_status.jpg

Or in the database:
xxx_virtuemart_products

product_in_stock.jpg

Based on the settings in Virtuemart -> Configuration -> Order Statuses,

A certain quantity of a product is booked/reserved when an order is placed.
status-confirmed.jpg

When the Order is set to shipped, the booked/reserved for the products in that order is substracted.
status-shipped.jpg



So one more time with an example:

Product X has a quantity of 2.
Customer A places an order for this product with a quantity of 1.

Quantity for product X is now 2 and Booked/reserved = 1.

Customer B can now only buy one quantity of Product X.

The order with Product X is shipped and the status is also set to Shipped.
The quantity for product X should now be 1 and booked/reserved = 0


That's when everything works as it should. However, when it doesn't update correctly, it could be that the quantity is 10 and booked is also 10 eventhough it should be 0. Meaning, nobody can order this product eventhough there is still a stock of 10 waiting to be sold.


Hopefully I explained it well
Attachments (4)
  1. more than a month ago
  2. RO CSVI
  3. # 10
Accepted Answer Pending Moderation
Hello Roderic,
When the Order is set to shipped, the booked/reserved for the products in that order is substracted.

Booked/reserved is subtracted from product_in_stock, correct? What if there are two orders with same product? Say Order X with booked/reserved as 2 for Product A and Order Y with booked/reserved as 1 for Product A, the total product_ordered will be 3. In such case when Order X is shipped, product_quantity from #__virtuemart_order_items table for Product A of Order X is read and subtracted from booked/reserved(product_ordered) and the same from product_in_stock. Is that correct? booked/reserved will be 1.

Just trying to understand the flow here:D
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 11
Accepted Answer Pending Moderation
Booked/reserved is subtracted from product_in_stock, correct?


It depends on the setting in this dropdown:

stock-handling.jpg


When the Status of an Order is updated to Shipped, and the settings of Shipped are set to is removed, then yes, old product_in_stock - product_ordered = new product_in_stock

In the case of Woest, it is set to is available. Meaning, only the product_ordered is substracted and product_in_stock is left alone.
Why? Because the hourly stock update from Vendit overwrites product_in_stock.

So for Woest and other webshops that are connected to a bookkeeping program, it needs to be set to Is available
For "standalone" webshops, it needs to be set to Is removed Then your example is 100% correct.


*updated*
Formulated it more clearly
Attachments (1)
  1. more than a month ago
  2. RO CSVI
  3. # 12
Accepted Answer Pending Moderation
Hello Roderic,
Thank you for the explanation.

When the Status of an Order is updated to Shipped, and the settings of Shipped are set to is removed, then yes, old product_in_stock - product_ordered = new product_in_stock

We need to see on how to use VirtueMart classes to handle these logics. We cannot code all that in RO CSVI, reason being maintaining the code in RO CSVI for any VirtueMart update is not going to be possible.

In the case of Woest, it is set to is available. Meaning, only the product_ordered is substracted and product_in_stock is left alone.
Why? Because the hourly stock update from Vendit overwrites product_in_stock.

So for Woest and other webshops that are connected to a bookkeeping program, it needs to be set to Is available
For "standalone" webshops, it needs to be set to Is removed Then your example is 100% correct.

We need a solution which can be accommodated for all sites and not just Woest. Considering that we have added this feature to our future todo list. For now we want to keep it simple to update only status of products with status of order.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 13
Accepted Answer Pending Moderation
Hello Tharuna,

We need to see on how to use VirtueMart classes to handle these logics. We cannot code all that in RO CSVI, reason being maintaining the code in RO CSVI for any VirtueMart update is not going to be possible.


I would think this basic virtuemart feature would not change much during updates?

We need a solution which can be accommodated for all sites and not just Woest. Considering that we have added this feature to our future todo list. For now we want to keep it simple to update only status of products with status of order.


Of course, but this is definitely not a Woest only problem. It's basic Virtuemart functionality. Right now, after installing the patch, it updates the status of the product in the order, but it doesn't change the quantities. This is actually worse then before because when I now click on update order status, it doesn't change anything as the status is already on Shipped. So I now have to manually check every product and change the numbers where needed. I hope you can reconsider putting this on a future todo.

Cheers
  1. more than a month ago
  2. RO CSVI
  3. # 14
Accepted Answer Pending Moderation
Hello Roderic,
I would think this basic virtuemart feature would not change much during updates?

We never know on what updates would bring :D

Of course, but this is definitely not a Woest only problem. It's basic Virtuemart functionality. Right now, after installing the patch, it updates the status of the product in the order, but it doesn't change the quantities. This is actually worse then before because when I now click on update order status, it doesn't change anything as the status is already on Shipped. So I now have to manually check every product and change the numbers where needed. I hope you can reconsider putting this on a future todo.

I understand your point. Our idea is to use VirtueMart classes instead of writing our own code. As mentioned we have added it to our future todo list. There is no ETA as of now but will keep you posted when we get to this. The todo has the link to this post so we can update you.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 15
Accepted Answer Pending Moderation
Hello,

I found a possible work-around. Product ordered is in the Stock.xml file, I could import this when importing stock so it would override the values in Virtuemart.

Only problem is, product_ordered is not selectable for a Product Availability template. Could you please add this field? (It is in Product import).

missing-product-ordered.jpg

Thanks
Attachments (1)
  1. more than a month ago
  2. RO CSVI
  3. # 16
Accepted Answer Pending Moderation
Hello Roderic,
Since that field is related to stock, we have added it to Product Availability template. Please load the attached patch file and then run the update of available fields. You should be able to use product_ordered field after that.

Let me know on how that goes.
Attachments (1)
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 17
Accepted Answer Pending Moderation
Hi Tharuna,

Thanks for the quick patch. It works and it helps on keeping the numbers of product_ordered in sync.

Perhaps you can also add product_availability to Product Availabilty template? That would also make sense :D






And is this also on the Todo list?


Possible solutions:

1. The order status import checks if the status is already the one that's being imported. If yes, it ignores it.
2. In the template there is this field: modified_on. There could be an option in the template that only looks at a status that is modified since last run or today (or any other date setting someone chooses in their template settings). Just like you can when exporting Orders
  1. more than a month ago
  2. RO CSVI
  3. # 18
Accepted Answer Pending Moderation
Hello Roderic,
Perhaps you can also add product_availability to Product Availabilty template? That would also make sense :D

By loading the attached patch file you can get product_availability field in Product Availabilty template after updating available fields.

And is this also on the Todo list?


Possible solutions:

1. The order status import checks if the status is already the one that's being imported. If yes, it ignores it.
2. In the template there is this field: modified_on. There could be an option in the template that only looks at a status that is modified since last run or today (or any other date setting someone chooses in their template settings). Just like you can when exporting Orders

No that is not added to todo list. VirtueMart does not look for any existing order history or have any filters to update order history. RO CSVI does the same. As of now only the feature of Booked/reserved update with order status update is added to todo list.
Attachments (1)
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 19
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!