error in checkout after update to 4.7.4

  • Posts: 97
  • Thank you received: 0
  • Hikashop Business
1 year 4 months ago #352923

-- url of the page with the problem -- : www.geertswarenhui
-- HikaShop version -- : 4.7.4
-- Joomla version -- : 3.10.11
-- PHP version -- : 8.1.18
-- Browser(s) name and version -- : Chrome
-- Error-message(debug-mod must be tuned on) -- : Unknown column 'total_number_of_products' in 'field list'

Startpagina
Call stack
# Function Location
1 () JROOT/libraries/joomla/database/driver/mysqli.php:610
2 mysqli_query() JROOT/libraries/joomla/database/driver/mysqli.php:610
3 JDatabaseDriverMysqli->execute() JROOT/administrator/components/com_hikashop/helpers/helper.php:2515
4 hikashopClass->save() JROOT/administrator/components/com_hikashop/classes/order.php:208
5 hikashopOrderClass->save() JROOT/administrator/components/com_hikashop/classes/order.php:913
6 hikashopOrderClass->createFromCart() JROOT/components/com_hikashop/controllers/checkout.php:678
7 checkoutController->confirm() JROOT/libraries/src/MVC/Controller/BaseController.php:702
8 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/administrator/components/com_hikashop/helpers/helper.php:2441
9 hikashopController->execute() JROOT/components/com_hikashop/hikashop.php:88
10 require_once() JROOT/libraries/src/Component/ComponentHelper.php:402
11 Joomla\CMS\Component\ComponentHelper::executeComponent() JROOT/libraries/src/Component/ComponentHelper.php:377
12 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/SiteApplication.php:194
13 Joomla\CMS\Application\SiteApplication->dispatch() JROOT/libraries/src/Application/SiteApplication.php:233
14 Joomla\CMS\Application\SiteApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:225
15 Joomla\CMS\Application\CMSApplication->execute() JROOT/index.php:49

Hi,

Very serious problem: my customers can't order right now:
Unknown column 'total_number_of_products' in 'field list'

Startpagina
Call stack
# Function Location
1 () JROOT/libraries/joomla/database/driver/mysqli.php:610
2 mysqli_query() JROOT/libraries/joomla/database/driver/mysqli.php:610
3 JDatabaseDriverMysqli->execute() JROOT/administrator/components/com_hikashop/helpers/helper.php:2515
4 hikashopClass->save() JROOT/administrator/components/com_hikashop/classes/order.php:208
5 hikashopOrderClass->save() JROOT/administrator/components/com_hikashop/classes/order.php:913
6 hikashopOrderClass->createFromCart() JROOT/components/com_hikashop/controllers/checkout.php:678
7 checkoutController->confirm() JROOT/libraries/src/MVC/Controller/BaseController.php:702
8 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/administrator/components/com_hikashop/helpers/helper.php:2441
9 hikashopController->execute() JROOT/components/com_hikashop/hikashop.php:88
10 require_once() JROOT/libraries/src/Component/ComponentHelper.php:402
11 Joomla\CMS\Component\ComponentHelper::executeComponent() JROOT/libraries/src/Component/ComponentHelper.php:377
12 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/SiteApplication.php:194
13 Joomla\CMS\Application\SiteApplication->dispatch() JROOT/libraries/src/Application/SiteApplication.php:233
14 Joomla\CMS\Application\SiteApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:225
15 Joomla\CMS\Application\CMSApplication->execute() JROOT/index.php:49

What to do?

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
1 year 4 months ago #352925

Hello,

Please use "check database" in your HikaShop configuration toolbar.
www.hikashop.com/support/documentation/5...-config.html#toolbar

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 97
  • Thank you received: 0
  • Hikashop Business
1 year 4 months ago #353000

HI Jerome,

That was also my first thought, but I already did that and all the tables were ok / green.

I set my website back to the backup of the day before update and every is working again.
Very strange.

Do you have any other idea?
So the latest version did not work, backup before the update is working, but is says that is has version: You have the latest stable version of HikaShop Business: 4.7.4

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
1 year 4 months ago #353003

Hi,

This error indicates that the total_number_of_products column in the table hikashop_order is missing.
This column is supposed to be added to the database during the update.
And the "check database" button is also supposed to add it there.
Without that column, it's normal you're getting that error.
If both the update and the check database processes are not able to add it, you can always go in your PHPMyAdmin and add that column to the hikashop_order table:
www.pair.com/support/kb/adding-a-column-...abase-in-phpmyadmin/
The type "int" will be ok.

Please Log in or Create an account to join the conversation.

  • Posts: 97
  • Thank you received: 0
  • Hikashop Business
1 year 4 months ago #353042

It is indeed missing in the databse, but...
In the SQL file of installation it is also missing... Or do I look over it? When I download the package, browse to back > tables.sql
Is the name 'total_number_of_products or order_total_numer_of_products?

CREATE TABLE IF NOT EXISTS `#__hikashop_order` (
	`order_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
	`order_billing_address_id` int(10) unsigned NOT NULL DEFAULT '0',
	`order_shipping_address_id` int(10) unsigned NOT NULL DEFAULT '0',
	`order_user_id` int(10) unsigned NOT NULL DEFAULT '0',
	`order_parent_id` int(10) unsigned NOT NULL DEFAULT '0',
	`order_status` varchar(255) NOT NULL DEFAULT '',
	`order_type` varchar(255) NOT NULL DEFAULT 'sale',
	`order_number` varchar(255) NOT NULL DEFAULT '',
	`order_created` int(10) unsigned NOT NULL DEFAULT '0',
	`order_modified` int(10) unsigned NOT NULL DEFAULT '0',
	`order_invoice_id` int(10) unsigned NOT NULL DEFAULT '0',
	`order_invoice_number` varchar(255) NOT NULL DEFAULT '',
	`order_invoice_created` int(10) unsigned NOT NULL DEFAULT '0',
	`order_currency_id` int(10) unsigned NOT NULL DEFAULT '0',
	`order_currency_info` TEXT NULL,
	`order_full_price` decimal(17,5) NOT NULL DEFAULT '0.00000',
	`order_tax_info` TEXT NULL,
	`order_discount_code` varchar(255) NOT NULL DEFAULT '',
	`order_discount_price` decimal(17,5) NOT NULL DEFAULT '0.00000',
	`order_discount_tax` decimal(17,5) NOT NULL DEFAULT '0.00000',
	`order_payment_id` varchar(255) NOT NULL DEFAULT '',
	`order_payment_method` varchar(255) NOT NULL DEFAULT '',
	`order_payment_price` decimal(17,5) NOT NULL DEFAULT '0.00000',
	`order_payment_tax` decimal(17,5) NOT NULL DEFAULT '0.00000',
	`order_payment_params` TEXT NULL,
	`order_shipping_id` varchar(255) NOT NULL DEFAULT '',
	`order_shipping_method` varchar(255) NOT NULL DEFAULT '',
	`order_shipping_price` decimal(17,5) NOT NULL DEFAULT '0.00000',
	`order_shipping_tax` decimal(17,5) NOT NULL DEFAULT '0.00000',
	`order_shipping_params` TEXT NULL,
	`order_partner_id` int(10) unsigned NOT NULL DEFAULT '0',
	`order_partner_price` decimal(17,5) NOT NULL DEFAULT '0.00000',
	`order_partner_paid` int(11) NOT NULL DEFAULT '0',
	`order_partner_currency_id` int(10) unsigned NOT NULL DEFAULT '0',
	`order_ip` varchar(255) NOT NULL DEFAULT '',
	`order_site_id` varchar(255) NULL DEFAULT '',
	`order_lang` varchar(255) NULL DEFAULT '',
	`order_token` varchar(255) NULL DEFAULT '',
	`order_weight` decimal(12,3) unsigned NULL,
	`order_weight_unit` varchar(255) NULL,
	`order_volume` decimal(12,3) unsigned NULL,
	`order_dimension_unit` varchar(255) NULL,
	PRIMARY KEY (`order_id`),
	KEY `order_user_id` (`order_user_id`)
) ENGINE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci*/;

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
1 year 4 months ago #353047

Hi,

Indeed. The message from Jerome actually missled me to a wrong conclusion.
There is no such column and it's normal.
You can always create it and it will solve the problem. But it should not be necessary.
I suppose you must be using some 3rd party plugin implementing the onBeforeOrderCreate event and messing with the order object before it is saved.
I've made some modifications in the way HikaShop deals with that total_number_of_products value so that it can't create an error in such cases.
Download the HikaShop install package on our website and install it on yours to get the patch and you should not get the error anymore, even without the column in the database.

Please Log in or Create an account to join the conversation.

Time to create page: 0.064 seconds
Powered by Kunena Forum