News:

Support the VirtueMart project and become a member

Main Menu

Getting "1054 Unknown column 'STsameAsBT' in 'field list'...

Started by JDmpdx, September 19, 2018, 21:43:42 PM

Previous topic - Next topic

JDmpdx

Hi all- 

Basics:  I'm using VM 3.4.0, Joomla 3.8.12, PHP 7.2.8

When people go to "confirm purchase," they are normally redirected to Paypal. But, currently, it just goes to an error page "1054 Unknown column 'STsameAsBT' in 'field list' "

I've tried:  (1) Disabling any HTML overrides ... same problem / didn't fix, (2) disabling a "One Step Checkout for Virtuemart" plugin ... same problem, didn't fix.

Any thoughts on what might be at play here?

tomaa

After update to VM 3.4.0 I got the same problem error when trying to change orderstatus from Payed to Shipped.
I need help to.

p.barg

Same problem here (on a test installation) with standard payment.

Leila

After update to VM 3.4 I have the same problem. Joomla 3.8.12, VM 3.4, PHP 7.2. Besides I get 404 error on product details page when activate customfileds with price. "Call to undefined method VirtueMartModelCustomfields::_getCustomPrice()".

AH

Looks like your order table has not been updated

Look in virtuemart_orders table

There should be a field STsameAsBT TINYINT default set to 0
Regards
A

Joomla 4.4.5
php 8.1

Milbo

Looks like the updater did not update the order table correctly. The order table has now
`STsameAsBT` tinyint(1) NOT NULL DEFAULT '0',

Usually the updater should also update the table structure. So it is interesting to understand, why that did not work in your case.
Quote from: Leila on September 20, 2018, 10:36:36 AM
After update to VM 3.4 I have the same problem. Joomla 3.8.12, VM 3.4, PHP 7.2. Besides I get 404 error on product details page when activate customfileds with price. "Call to undefined method VirtueMartModelCustomfields::_getCustomPrice()".


This is quite likely an outdated template. The function was set to deprecated a year ago (Revision 9639). I must admit this template change slipped through. 

It was

$price = VirtueMartModelCustomfields::_getCustomPrice($productCustom->customfield_price, $currency, $calculator);


and is now

$price = VirtueMartModelCustomfields::renderCustomfieldPrice($productCustom, $product, $calculator);
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Leila

Milbo, thank you very much for help. The problem is solved. Will you help me with another similar question? When I save product in backend I have error " Unknown column 'product_canon_category_id' in 'field list'"
Now I understand that I have to add some data to DB, but i dont know where exactly.

Milbo

It seems to be the same problem. The table updater is not executed. You should first try todo that manually. Maybe  set your page offline for that time. Maybe you have a lot visitors, so that the db is not properly updated? I dont know, I can just guess.

Please check  http://docs.virtuemart.net/manual/tools-menu/70-tools-migration.html and use "INSTALL TABLES OR IF NECESSARY UPDATE THEM"
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Leila


JDmpdx

Yep, that error is no longer present after running the database tool. Thanks!  I believe I have one further issue, but it appears unrelated, so I'll post a sseparate topic, as the fix here seemed to fix things for everyone.

AH

Regards
A

Joomla 4.4.5
php 8.1

Milbo

Quote from: Milbo on September 20, 2018, 11:00:44 AM
This is quite likely an outdated template. The function was set to deprecated a year ago (Revision 9639). I must admit this template change slipped through. 

It was

$price = VirtueMartModelCustomfields::_getCustomPrice($productCustom->customfield_price, $currency, $calculator);


and is now

$price = VirtueMartModelCustomfields::renderCustomfieldPrice($productCustom, $product, $calculator);


This function will be readded in the next release, coming the next days. We also found the reason that the updater did not update the tables properly.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/