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

Error inserting new order: vmTable store insertObject

Started by ocram44, February 27, 2025, 18:27:21 PM

Previous topic - Next topic

ocram44

When storing a new order this error occurs:

"vmTable store insertObject"

The details about the error when debugging are as follows:
mysqli_sql_exception: Out of range value for column 'virtuemart_calc_id' at row 1
It tries to store the id -1 in the table 'jos_virtuemart_order_calc_rules'.

Someone can help?

Virtuemart Version: 4.4.6 11109
Joomla Version: 5.2.3
PHP Version: 8.3

p.barg

Hello,

I've had that problem too. In my case the culprit was a payment method that had no tax rule selected. After setting
the tax field to "default", the problem was gone.

Hope that helps,

Petra

ocram44

Hi,
Thanks Petra.
My Payment Tax field shows this value: "Apply default rules".
Unfortunately the error persists.

p.barg

Hi,
you may also want to check the taxes in shipping rules.
If you check the log file, you may find some more detailed information about the sql error.

Petra

ocram44

Hi,
Since I don't need VAT tax on the products there were no "taxes and calculation rules". IT worked until now like that, but it seems that I need to specify at least on VAT tax calculation rule with the new version. So I did just specify a 0% Tax Rule and now it works.
Thanks for your help.

Milbo

That is really a funny, strange hack to solve this problem. But great way. I wonder what means "until now". What changed? did you update your joomla, or just virtuemart?

Ahh moment. I just see. Yes. Just Virtuemart. It looks like that the tableupdater did not update your __virtuemart_order_calc_rules table. The columns virtuemart_calc_id must not have "unsigned", just normal int.
The -1 is used if it tries to set a "mixed" rule. So it should also work to set in the config the "Simplified VAT for shipping".
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/