VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: dimarini on February 11, 2012, 12:58:01 PM

Title: Cannot delete Orders
Post by: dimarini on February 11, 2012, 12:58:01 PM
Hello,
A strange thing happened!
In the backend in component Virtuemart, Orders & Shoppers I want to delete some orders!
When I tried to do so a red notice appeared saying "Order could not be deleted. VirtueMartModelOrders::remove 30"!
What is the problem and how to delete this order?

Thank you!
Title: Re: Cannot delete Orders
Post by: John2400 on February 13, 2012, 05:51:18 AM
This happened to me,

After updating to 2.0.1 e then f it disappeared.

Could you write to show which versions you are using.
Title: Re: Cannot delete Orders
Post by: knirving on April 21, 2012, 19:46:56 PM
I had the same issue today on two sites at 1.5.26 and VM 2.0.6

Received this Error:


        vmError:
        vmError: VirtueMartModelOrders::remove 12
        Order could not be deleted.
Title: Re: Cannot delete Orders
Post by: topart on April 24, 2012, 17:01:36 PM
me 2.06
Title: Re: Cannot delete Orders
Post by: estaser on May 01, 2012, 12:45:08 PM
Can you remove the orders? I have de same problem...  :'(
Title: Re: Cannot delete Orders
Post by: Clocked0ne on May 14, 2012, 21:03:25 PM
Same problem here also on Joomla 1.7 and VM 2.0.6
Title: Re: Cannot delete Orders
Post by: ZX81 on May 14, 2012, 21:37:45 PM
I had got this problem on v2.0.4. My problem was caused when I deleted my paypal payment method (I was trying to fix another problem). I found that the orders have a link to the payment method and for some reason VM tries to validate the payment method on delete. The only way I could get around this was to delete the orders directly from the database.

Did you delete a payment method? If not maybe you deleted something else that is mandatory for orders?

ZX
Title: Re: Cannot delete Orders
Post by: Clocked0ne on May 15, 2012, 02:07:37 AM
Nothing was changed between the orders being placed and attempting to delete them, one was a new order placed only yesterday. As they are test orders I simply deleted them from the database and it is no big deal, live orders will simply be cancelled as necessary instead.
Title: Re: Cannot delete Orders
Post by: Tikkiro on July 10, 2012, 17:24:28 PM
Glad to find I'm not alone on this one.  For me, it's primarily test orders that never went through to payment I'm unable to get deleted in the component but, as others have mentioned, it's relatively easy to do in the database although more care is required as it's not always so easy to be sure and of course easy, when you know your way around the DB - not so for a newbie :(   Perhaps the VM guys will take notice & work to provide a fix soon.
Title: Re: Cannot delete Orders
Post by: John2400 on July 11, 2012, 03:21:06 AM
I too could not delete some orders -

I thank the developers for having a look and I found they can be deleted in the PHP myadmin - table ***.virtuemart .orders ** I pulled up the orders page in VM2 back end and then opened the table as well and deleted one at a time then refreshed - just to make sure -.

* always best to backup first - .
Title: Re: Cannot delete Orders
Post by: Allen_K on January 27, 2013, 16:13:09 PM
It's January 2013, and I'm having this problem with VM 2.0.18a on Joomla 2.5.8. When I try to delete a test order, I get:

vmError: Seems the used shipmentmethod got deleted
vmError: TableOrders delete Order shipmentTable = #__virtuemart_shipment_plg_ `virtuemart_order_id` = 19 dbErrorMsg
vmError: VirtueMartModelOrders::remove 19
Order could not be deleted.

I did not change shipment methods or anything else between creating the test order and attempting to delete it. Hopefully the developers will add this to the bugs to be fixed
Title: Re: Cannot delete Orders
Post by: ufo_hk on March 20, 2013, 00:04:51 AM
Joomla 2.5.9 Vm 2.0.20b recently updated from 2.0.18

Tried deleting order in admin - received error message:
vmError: Seems the used shipmentmethod got deleted
vmError: TableOrders delete Order shipmentTable = #__virtuemart_shipment_plg_ `virtuemart_order_id` = 19 dbErrorMsg
vmError: VirtueMartModelOrders::remove 1
Order could not be deleted.

So entered database "xxxx_virtuemart_orders" table and deleted offending order. Seemed to work fine as order disppeared.

However considering that the OP was logged over a year ago would be nice for someone to confirm if this is a suitable/correct solution
Title: Re: Cannot delete Orders
Post by: t68 on April 16, 2013, 09:22:00 AM
Also have problems removing some testorders. get error message:
"vmError:
vmError: VirtueMartModelOrders::remove 16
Order could not be deleted."

Weird thing: when I mark an order and press delete the name and email in the order is deleted and I end up with an almost empty order with an ID that cannot be deleted.

Se some posts about entering the DB to remove. How do I do that. Not familiar with doing stuff directly in the DB.
Title: Re: Cannot delete Orders
Post by: ufo_hk on September 04, 2013, 06:42:18 AM
@t68

Follow instructions in this thread from ivus - re manually deleting orders:
http://forum.virtuemart.net/index.php?topic=107570.0

You need to access your database to edit usually via PHPmyadmin, check with your hoster.