Post by andyd92 » Wed Feb 11, 2015 10:16 am

Hi all,

I'm running Opencart 2.0.1.1 and get an error from Openbay,

PHP Notice: Error: Unknown column 'carrier_id' in 'field list'<br />Error No: 1054<br /> Error in: <b>/home/...../public_html/***************/system/library/ebay.php</b> line <b>842</b><br />UPDATE `oc_ebay_order` SET `carrier_id` = 'RM Return Service', `tracking_no` = '' WHERE `order_id` = '1029' LIMIT 1 in /home/...../public_html/***************/system/library/db/mysql.php on line 53

I contacted their support and they said to fix the issue I need to insert the following into my database:

(
`ebay_order_id` int(11) NOT NULL AUTO_INCREMENT,
`parent_ebay_order_id` int(11) NOT NULL,
`order_id` int(11) NOT NULL,
`smp_id` int(11) NOT NULL,
`tracking_no` varchar(100) NOT NULL,
`carrier_id` varchar(100) NOT NULL,
PRIMARY KEY (`ebay_order_id`),
KEY `order_id` (`order_id`),
KEY `smp_id` (`smp_id`),
KEY `parent_ebay_order_id` (`parent_ebay_order_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

They said create a table oc_ebay_order unless one already exists. I have found that table in phpmyadmin, but can someone offer some guidance how I insert that code? I skills in phpmyadmin are very limited so step by step would be good.

Thanks in advance.

New member

Posts

Joined
Tue Dec 11, 2012 1:50 am

Post by panagos » Sun Oct 25, 2015 3:37 am

If the table does exist then it sounds like you are missing the column required by the script:

Code: Select all

   ALTER TABLE oc_ebay_order ADD COLUMN `carrier_id` varchar(100) NOT NULL COLLATE utf8_general_ci;
Typically something like this will work, assuming the table does not exist (the script will actually not do anything if the table does exist):

create table if not exists `oc_ebay_order`
(
`ebay_order_id` int(11) NOT NULL AUTO_INCREMENT,
`parent_ebay_order_id` int(11) NOT NULL,
`order_id` int(11) NOT NULL,
`smp_id` int(11) NOT NULL,
`tracking_no` varchar(100) NOT NULL,
`carrier_id` varchar(100) NOT NULL,
PRIMARY KEY (`ebay_order_id`),
KEY `order_id` (`order_id`),
KEY `smp_id` (`smp_id`),
KEY `parent_ebay_order_id` (`parent_ebay_order_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

If the table does exist you will probably need to drop the table first.

--
Soteri Panagou
Freelance Developer and Opencart Zealot

http://www.opencart.com/index.php?route ... @gmail.com


New member

Posts

Joined
Sun Oct 25, 2015 3:01 am

Who is online

Users browsing this forum: No registered users and 6 guests