News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Avatax plgVmOnUpdateOrderPayment error checking existing DocId: Unknown column '

Started by G0KSC2, May 26, 2020, 08:34:13 AM

Previous topic - Next topic

G0KSC2

After the recent virtuemart update, I am seeing this error, anyone know where this might be located and how to  fix?

Milbo

I wonder if this is a false positive


- Only create Avalara transaction if no existing DocId is stored
// in avalara_doc_id custom shopper field
$db = JFactory::getDBO();
$query = "SELECT avalara_doc_id" .
" FROM #__virtuemart_order_userinfos" .
" WHERE virtuemart_order_id = " . $data->virtuemart_order_id .
" AND address_type = 'BT'";
$db->setQuery($query);
$docId = null;
try {
$docId = $db->loadResult();
} catch (RuntimeException $ex) {
vmError('Avatax plgVmOnUpdateOrderPayment error checking existing DocId: ' . $ex->getMessage());
}

if (empty($docId)) {
$this->creditMemo($data);
}


The comment says - Only create Avalara transaction if no existing DocId is stored
and then it throws always an exception if it is not there? But below is a normal flow when it is not there. Does it work otherwise?
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

FX2LTD

Hi,
I have been working on my new online shop. I placed a test order and during its cancellation, I got this message: vmError: Avatax cancelOrder error checking existing DocId: Unknown column 'avalara_doc_id' in 'field list'
I only clicked on the order status and from pending I moved it to cancelled.
I have no idea of what this error implies...

GJC Web Design

are u using Avalara as a tax gateway/plugin?
If not unpublish the plugin
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

FX2LTD


GJC Web Design

especially unpublish any unused shipping and payment plugins .. they all take resources even if unused
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

ebrilz

Hi everyone! I'm the one responsible for this happening.  Max is correct that the line of code calling vmError should be commented out.  Sorry about that.
Until that happens, the first thing everyone should do (as suggested by GJC Web Design) is to disable the Avalara calculation plugin if you're not using it.  Only publish plugins you're using.
If you actually are using Avalara with your VM store, then you will want to create a shopper field called avalara_doc_id with type Text.  It should be published, but shouldn't be required and shouldn't show in any forms.  This will enable the Avalara plugin to work properly and will get rid of the error message.