500 Table '_phocacart_content_types' doesn't exist

Phoca Cart - complex e-commerce extension
adm
Phoca Enthusiast
Phoca Enthusiast
Posts: 58
Joined: 19 Nov 2008, 12:12

500 Table '_phocacart_content_types' doesn't exist

Post by adm »

PhocaCart 5.0.0Beta36

During the update, the table _phocacart_content_types was not created. The error occurs, when you click on categories in the backend.

Tags:
User avatar
Benno
Phoca Hero
Phoca Hero
Posts: 9435
Joined: 04 Dec 2008, 11:58
Location: Germany
Contact:

Re: 500 Table '_phocacart_content_types' doesn't exist

Post by Benno »

Hi,
unzip com_phocacart_v5.0.0Beta36.zip local on your pc. Then go to:
admin-->update-->sql-->mysql-->5.0.0.sql
There you find all 5.0.0 querys.

To create 'phocacart_content_types' table run this queries in phpMyAdmin:

Code: Select all

CREATE TABLE IF NOT EXISTS `#__phocacart_content_types` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `title` varchar(255) NOT NULL,
    `context` varchar(255) NOT NULL,
    `published` tinyint(1) NOT NULL DEFAULT 0,
    `checked_out` int(11),
    `checked_out_time` datetime,
    `ordering` int(11) NOT NULL DEFAULT 0,
    `params` text,
    PRIMARY KEY (`id`),
    KEY `idx_context` (`context`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;

INSERT INTO `#__phocacart_content_types` (`id`, `title`, `context`, `published`, `ordering`, `params`)
    VALUES (1, 'COM_PHOCACART_CONTENT_TYPE_CATEGORY_DEFAULT', 'category', 1, 1, '{}');
INSERT INTO `#__phocacart_content_types` (`id`, `title`, `context`, `published`, `ordering`, `params`)
    VALUES (2, 'COM_PHOCACART_CONTENT_TYPE_RELATED_DEFAULT', 'product_related', 1, 1, '{}');
Change:
#_
to your database prefix before.

Kind regards,
Benno
adm
Phoca Enthusiast
Phoca Enthusiast
Posts: 58
Joined: 19 Nov 2008, 12:12

Re: 500 Table '_phocacart_content_types' doesn't exist

Post by adm »

Now missing field `category_type`. Addes with:

ALTER TABLE `#__phocacart_categories` ADD COLUMN `category_type` INT(11) AFTER `owner_id`;

Now there is no error, but no category will be displayed.
adm
Phoca Enthusiast
Phoca Enthusiast
Posts: 58
Joined: 19 Nov 2008, 12:12

Re: 500 Table '_phocacart_content_types' doesn't exist

Post by adm »

Fix it with:
UPDATE _phocacart_categories SET category_type = 1
User avatar
Benno
Phoca Hero
Phoca Hero
Posts: 9435
Joined: 04 Dec 2008, 11:58
Location: Germany
Contact:

Re: 500 Table '_phocacart_content_types' doesn't exist

Post by Benno »

Ok.

Kind regards,
Benno
Post Reply