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

VM Checkout Error

Started by sohopros, July 31, 2023, 19:48:06 PM

Previous topic - Next topic

sohopros

VirtueMart: 4.0.22 10864
PHP: 8.0 (ea-php80)
Joomla: 4.3.3

When submitting an order for payment, the customer sees this error and cannot proceed:
Error:
vmTable store insertObject
Couldn't create order

We also see this entry in the VM error logs:

2023-07-25 08:06:41 ERROR vmError: vmTable store insertObject #__virtuemart_orders Data too long for column 'order_billTax' at row 1 INSERT INTO `jos_virtuemart_orders`
(`virtuemart_order_id`,`virtuemart_user_id`,`virtuemart_vendor_id`,`order_note`,`order_number`,`order_pass`,`order_create_invoice_pass`,`invoice_locked`,`customer_number`,`order_total`,`order_salesPrice`,`order_billTaxAmount`,`order_billTax`,`order_billDiscountAmount`,`order_discountAmount`,`order_subtotal`,`order_tax`,`order_shipment`,`order_shipment_tax`,`order_payment`,`order_payment_tax`,`coupon_discount`,`order_discount`,`order_currency`,`order_status`,`user_currency_id`,`user_currency_rate`,`user_shoppergroups`,`payment_currency_id`,`payment_currency_rate`,`virtuemart_paymentmethod_id`,`virtuemart_shipmentmethod_id`,`ip_address`,`order_language`,`STsameAsBT`,`paid`,`o_hash`,`locked_by`,`created_on`,`created_by`) VALUES
('0','4848','1','','UBB503474','p_QMQrdnTj','90CK7Jui','0','BOd9b09f3','168.56964839','152.9924','34.68964839','{
    \"1\": {
        \"virtuemart_calc_id\": 1,
        \"calc_name\": \"VAT - Spain\",
        \"calc_value\": \"21.0000\",
        \"result\": 28.1148
    },
    \"4\": {
        \"virtuemart_calc_id\": 4,
        \"calc_name\": \"Product tax 5.2%\",
        \"calc_value\": 4.2975,
        \"result\": 6.57484839
    },
    \"5\": {
        \"virtuemart_calc_id\": 5,
        \"calc_name\": \"Shipping Tax 5.2%\",
        \"calc_value\": 0.0,
        \"result\": 0.0
    }
}','0','0','126.44','26.5524','7.44','1.5624','0','0','0','0','47','P','47','1','2,11','47','1','1','417','2.136.55.xx','es-ES','1','0','75185a17f1339b05371877010ccc063c','0','2023-07-25 08:06:41','4848')<pre>#0  vmError() called at [/home/[dom]/public_html/administrator/components/com_virtuemart/helpers/vmtable.php:1338]
#1  VmTable->store() called at [/home/[dom]/public_html/administrator/components/com_virtuemart/helpers/vmtable.php:2031]
#2  VmTable->bindChecknStoreNoLang() called at [/home/[dom]/public_html/administrator/components/com_virtuemart/helpers/vmtable.php:1966]
#3  VmTable->bindChecknStore() called at [/home/[dom]/public_html/administrator/components/com_virtuemart/models/orders.php:1812]
#4  VirtueMartModelOrders->_createOrder() called at [/home/[dom]/public_html/administrator/components/com_virtuemart/models/orders.php:1644]
#5  VirtueMartModelOrders->createOrderFromCart() called at [/home/[dom]/public_html/components/com_virtuemart/helpers/cart.php:1887]
#6  VirtueMartCart->confirmedOrder() called at [/home/[dom]/public_html/components/com_virtuemart/helpers/cart.php:1597]
</pre>
=============================================
So far, it looks like changing the order_billTax field in the jos_virtuemart_orders table from varchar(400) to varchar(1000) has fixed it. Our main concern is that a later software update will over-write the change, or that this change will cause other problems.
Help? Any advice??

GJC Web Design

It won't cause any problems

I think the hidden config switch to NOT change the DB layout on upgrades is dblayoutstrict

perhaps someone else can confirm

https://www.jooglies.com/en/tutorials/virtuemart/60-virtuemart-the-hidden-configuration
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

sohopros

"It won't cause any problems ..." - thanks! Should this reported to the dev group, so a permanent change can be incorporated in a future release? (Not sure how to do that.)

Milbo

I just worked on the same topic for a german member, so I just take your 1000 chars for 3 taxrates.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/