[PC 6.1b7] Payment notifications db column is missing

Phoca Cart - complex e-commerce extension
mjmartino
Phoca Enthusiast
Phoca Enthusiast
Posts: 92
Joined: 10 Jun 2019, 15:53

[PC 6.1b7] Payment notifications db column is missing

Post by mjmartino »

Hi Jan
Planti.cz as for your Help. Phoca Cart 6.1 beta 7

Code: Select all

The 500 problem looks like a PhocaCart's db column is missing 
"Unknown column 'cu.bank_account_number' in 'SELECT'"
Our plugin just calls a phocaCart method which in turn causes this errror
 uniadapter.php(481): PhocacartOrderView->getItemCommon()
Please ask for help the PhocaCart support as it is not an error in our plugin.
From log.
*** Tue, 27 Jan 2026 14:46:41 +0100 UniErrInfo: Referer: Agent: 'Zend_Http_Client'
*** Tue, 27 Jan 2026 14:46:41 +0100 UniErrInfo: , Rethrowing exception mysqli_sql_exception: Unknown column 'cu.bank_account_number' in 'SELECT' in /public_html/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php:138
Stack trace:
#0 /public_html/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php(138): mysqli->prepare()
#1 /public_html/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php(972): Joomla\Database\Mysqli\MysqliStatement->__construct()
#2 /public_html/libraries/vendor/joomla/database/src/DatabaseDriver.php(1780): Joomla\Database\Mysqli\MysqliDriver->prepareStatement()
#3 /public_html/administrator/components/com_phocacart/libraries/phocacart/order/view.php(156): Joomla\Database\DatabaseDriver->setQuery()
#4 /public_html/plugins/uniadapter/phocaadapter/lib/UniModul/uniadapter.php(481): PhocacartOrderView->getItemCommon()
#5 /public_html/plugins/uniadapter/phocaadapter/lib/UniModul/uniadapter.php(445): plgPCPUniAdapter->processReplyStatus()
#6 /public_html/plugins/uniadapter/phocaadapter/lib/UniModul/uniadapter.php(418): plgPCPUniAdapter->PCPbeforeCheckPayment()
#7 /public_html/libraries/src/Plugin/CMSPlugin.php(320): plgPCPUniAdapter->onPCPbeforeCheckPayment()
#8 /public_html/libraries/vendor/joomla/event/src/Dispatcher.php(454): Joomla\CMS\Plugin\CMSPlugin->Joomla\CMS\Plugin\{closure}()
#9 /public_html/administrator/components/com_phocacart/libraries/src/Dispatcher/Dispatcher.php(23): Joomla\Event\Dispatcher->dispatch()
#10 /public_html/components/com_phocacart/controllers/response.php(89): Phoca\PhocaCart\Dispatcher\Dispatcher::dispatch()
#11 /public_html/libraries/src/MVC/Controller/BaseController.php(730): PhocaCartControllerResponse->paymentnotify()
#12 /public_html/components/com_phocacart/phocacart.php(18): Joomla\CMS\MVC\Controller\BaseController->execute()
#13 /public_html/libraries/src/Dispatcher/LegacyComponentDispatcher.php(71): require_once('...')
#14 /public_html/libraries/src/Dispatcher/LegacyComponentDispatcher.php(73): Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}()
#15 /public_html/libraries/src/Component/ComponentHelper.php(361): Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch()
#16 /public_html/libraries/src/Application/SiteApplication.php(217): Joomla\CMS\Component\ComponentHelper::renderComponent()
#17 /public_html/libraries/src/Application/SiteApplication.php(271): Joomla\CMS\Application\SiteApplication->dispatch()
#18 /public_html/libraries/src/Application/CMSApplication.php(304): Joomla\CMS\Application\SiteApplication->doExecute()
#19 /public_html/includes/app.php(58): Joomla\CMS\Application\CMSApplication->execute()
#20 /public_html/index.php(51): require_once('...')
#21 {main}

Can you help.
mjmartino
Phoca Enthusiast
Phoca Enthusiast
Posts: 92
Joined: 10 Jun 2019, 15:53

Re: [PC 6.1b7] Payment notifications db column is missing

Post by mjmartino »

probably problem is with update 5.2.3 to 6 or 6.1
Not all alter table is added.

install.sql have only created.. if someone update don't have this new table bank,pdf,etc.

Code: Select all

CREATE TABLE IF NOT EXISTS `#__phocacart_currencies` (
  `id` int(11) NOT NULL auto_increment,
  `title` varchar(255) NOT NULL DEFAULT '',
  `alias` varchar(255) NOT NULL DEFAULT '',
  `code` varchar(5) NOT NULL DEFAULT '',
  `image` varchar(255) NOT NULL DEFAULT '',
  `exchange_rate` DECIMAL( 15, 8 ) NOT NULL DEFAULT '0',
  `price_format` tinyint(1) NOT NULL DEFAULT '0',
  `price_currency_symbol` varchar(10) NOT NULL DEFAULT '',
  `price_dec_symbol` char(1) NOT NULL DEFAULT '',
  `price_decimals` tinyint(1) NOT NULL DEFAULT '0',
  `price_thousands_sep` char(1) NOT NULL DEFAULT '',
  `price_suffix` varchar(255) NOT NULL DEFAULT '',
  `price_prefix` varchar(255) NOT NULL DEFAULT '',
  `bank_account_number` varchar(100) NOT NULL DEFAULT '',
  `iban` varchar(50) NOT NULL DEFAULT '',
  `bic_swift` varchar(50) NOT NULL DEFAULT '',
  `pdf_invoice_qr_information` text NOT NULL,
  `pdf_invoice_qr_code` text NOT NULL,
  `published` tinyint(1) NOT NULL DEFAULT '0',
  `checked_out` int unsigned,
  `checked_out_time` datetime,
  `ordering` int(11) NOT NULL DEFAULT '0',
  `params` text,
  `language` char(7) NOT NULL DEFAULT '',
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;
Table currencies after updated PC 5.2.3 -> 6 and 6.1b7
https://ibb.co/C3nHf6VZ

I hope that more columns are not missing in other tables.. because this will generate errors in various circumstances!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49279
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: [PC 6.1b7] Payment notifications db column is missing

Post by Jan »

Hi, thank you for this info, this will be changed in 6.1.0Beta8:

FROM:
`pdf_invoice_qr_information` text NOT NULL,
`pdf_invoice_qr_code` text NOT NULL,

TO:
`pdf_invoice_qr_information` text,
`pdf_invoice_qr_code` text,

as it can cause problems when installing

The update can be found in:
administrator/components/com_phocacart/update/sql/mysql/6.1.0.sql

Code: Select all

ALTER TABLE `#__phocacart_currencies` ADD `bank_account_number` varchar(100) NOT NULL DEFAULT '';
ALTER TABLE `#__phocacart_currencies` ADD `iban` varchar(50) NOT NULL DEFAULT '';
ALTER TABLE `#__phocacart_currencies` ADD `bic_swift` varchar(50) NOT NULL DEFAULT '';
ALTER TABLE `#__phocacart_currencies` ADD `pdf_invoice_qr_information` text;
ALTER TABLE `#__phocacart_currencies` ADD `pdf_invoice_qr_code` text;
Jan
If you find Phoca extensions useful, please support the project
Post Reply