News:

Support the VirtueMart project and become a member

Main Menu

Manually delete orders in database for Virtuemart 2

Started by Kannan76, September 14, 2012, 06:06:12 AM

Previous topic - Next topic

Kannan76

Hi,

How do i manually delete the order rows in the database. I'm getting this error, while trying to delete in the BE

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

Im using virtuemart 2.0.10 and joomla 2.5.6

ivus

Hi Kannan76,

Use phpMyAdmin.

A single order is stored in at least 8 tables. I say AT LEAST because your may have more PLUGINS installed for payment and shipment.

  • #__virtuemart_orders
  • #__virtuemart_order_histories
  • #__virtuemart_order_items
  • #__virtuemart_order_userinfos
  • #__virtuemart_payment_plg_paypal
  • #__virtuemart_shipment_plg_weight_countries
  • #__virtuemart_invoices
  • #__virtuemart_order_calc_rules

Firstly, goto #__virtuemart_orders and find your order. Take note of the VIRTUEMART_ORDER_ID and then go through each of the other tables an remove the line items that has that same VIRTUEMART_ORDER_ID.

Be sure to also check the shipping and payment plugin tables for the VIRTUEMART_ORDER_ID too. The table names should following this naming convention:

  • SHIPMENT PLUGIN = #__virtuemart_shipment_plg_PLUGIN_NAME
  • PAYMENT PLUGIN = #__virtuemart_payment_plg_PLUGIN_NAME

Kannan76

Thank you ivus, all the orders have left the building!  ;D  ;D  8)

suchafan

#3
VM 2.0.8e
Joomla 2.5.7

What do you do when you have searched all of your mentioned categories in the db and the order numbers still cannot be found in those areas? 3 orders are in the VM2 orders but they are nowhere to be found in the db. This is the message I get when I try to delete them in VM2:

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

Could a developer take a look, perhaps? I don't know where to look anymore....Thank you :)