News:

Support the VirtueMart project and become a member

Main Menu

Any Shipped Order Decrements Product "In Stock" to 1

Started by blurryglass, December 04, 2013, 05:26:38 AM

Previous topic - Next topic

blurryglass

Hi, we're running VirtueMart 2.0.20b. The problem is that no matter how many units we have in stock of a particular item, whenever an order status is set to shipped, the product "in stock" level becomes 1. I have confirmed in the vituemart_order_items table that every order has "product_quantity" of 1; how is this possible? My apologies if this should have been posted in the bugs forum.

Thanks for any assistance!

jenkinhill

Have you hacked any core files? There are no reports of this from anyone else but that version is 9 months old and is known to have critical security issues. Updating is highly recommended to the latest version (currently 2.0.24c) which may just fix your issue. You may need to edit any 3rd party template overrides you use to work securely with the current version.
See http://virtuemart.net/news/latest-news/446-important-security-release-vm-team-at-joomladay-germany
and http://forum.virtuemart.net/index.php?topic=118683.0
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

blurryglass

Quote from: jenkinhill on December 04, 2013, 12:22:57 PM
Have you hacked any core files? There are no reports of this from anyone else but that version is 9 months old and is known to have critical security issues. Updating is highly recommended to the latest version (currently 2.0.24c) which may just fix your issue. You may need to edit any 3rd party template overrides you use to work securely with the current version.
See http://virtuemart.net/news/latest-news/446-important-security-release-vm-team-at-joomladay-germany
and http://forum.virtuemart.net/index.php?topic=118683.0

Yes, we have added custom business logic to the orders view (orders.php and order.php), but have not modified any of the code therein, only included our code at the top. The custom code makes determinations on what order status an items should have, and directly modifies the database to reflect that determination. We also have MySQL triggers performing similar but more rudimentary functions.

The only action taken by our custom "hacks" is to change order statuses in the database.

I noticed that the order statuses in the virtuemart_order_items table are out of sync with the order statuses in the virtuemart_orders table. Could this be the cause of the problem? Presumably this is a bug in our own code, not Virtuemart's.

Thanks again.


jenkinhill

As I said, I know of no other reports of this, which would tend to indicate an issue with your coding.

Somehow I doubt it, but maybe running the tool "Install or if necessary update tables "  would help - but test this on a backup.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum