- Posts: 3
- Thank you received: 0
Import from mijoshop error
11 years 5 months ago - 11 years 5 months ago #197587
by Sigizmunt
Import from mijoshop error was created by Sigizmunt
-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.4.1
-- Error-message(debug-mod must be tuned on) -- : Error
Hello. Can't import data from mijoshop. There's an error message:
Duplicate entry '27' for key 'PRIMARY' SQL=INSERT INTO `w21aqq_hikashop_category` (`category_id`,`category_parent_id`,`category_type`,`category_name`,`category_description`,`category_published`,`category_ordering`,`category_namekey`,`category_created`,`category_modified`,`category_access`,`category_menu`) VALUES (27,2,'product','Колье и украшения на шею','',1,7,'2__10777','1391672241','1427228343','all',0),(27,2,'product','Колье и украшения на шею','',1,7,'2__15070','1391672241','1427228343','all',0),(29,2,'product','Комплекты','',1,10,'2__25791','1391672265','1427228349','all',0),(29,2,'product','Комплекты','',1,10,'2__18316','1391672265','1427228349','all',0),(31,2,'product','Серьги','',1,10,'2__20181','1391672286','1427228355','all',0),(31,2,'product','Серьги','',1,10,'2__9962','1391672286','1427228355','all',0),(33,2,'product','Украшения на голову','',1,19,'2__3547','1391672326','1427228362','all',0),(33,2,'product','Украшения на голову','',1,19,'2__20600','1391672326','1427228362','all',0),(35,2,'product','Браслеты','',1,22,'2__849','1391672356','1427228331','all',0),(35,2,'product','Браслеты','',1,22,'2__18358','1391672356','1427228331','all',0),(37,2,'product','Броши','',1,25,'2__11447','1391672386','1427228338','all',0),(37,2,'product','Броши','',1,25,'2__31780','1391672386','1427228338','all',0);
What's wrong?Thanks.
-- Joomla version -- : 3.4.1
-- Error-message(debug-mod must be tuned on) -- : Error
Hello. Can't import data from mijoshop. There's an error message:
Duplicate entry '27' for key 'PRIMARY' SQL=INSERT INTO `w21aqq_hikashop_category` (`category_id`,`category_parent_id`,`category_type`,`category_name`,`category_description`,`category_published`,`category_ordering`,`category_namekey`,`category_created`,`category_modified`,`category_access`,`category_menu`) VALUES (27,2,'product','Колье и украшения на шею','',1,7,'2__10777','1391672241','1427228343','all',0),(27,2,'product','Колье и украшения на шею','',1,7,'2__15070','1391672241','1427228343','all',0),(29,2,'product','Комплекты','',1,10,'2__25791','1391672265','1427228349','all',0),(29,2,'product','Комплекты','',1,10,'2__18316','1391672265','1427228349','all',0),(31,2,'product','Серьги','',1,10,'2__20181','1391672286','1427228355','all',0),(31,2,'product','Серьги','',1,10,'2__9962','1391672286','1427228355','all',0),(33,2,'product','Украшения на голову','',1,19,'2__3547','1391672326','1427228362','all',0),(33,2,'product','Украшения на голову','',1,19,'2__20600','1391672326','1427228362','all',0),(35,2,'product','Браслеты','',1,22,'2__849','1391672356','1427228331','all',0),(35,2,'product','Браслеты','',1,22,'2__18358','1391672356','1427228331','all',0),(37,2,'product','Броши','',1,25,'2__11447','1391672386','1427228338','all',0),(37,2,'product','Броши','',1,25,'2__31780','1391672386','1427228338','all',0);
What's wrong?Thanks.
Last edit: 11 years 5 months ago by Sigizmunt.
Please Log in or Create an account to join the conversation.
11 years 5 months ago #197602
by Xavier
Replied by Xavier on topic Import from mijoshop error
Hi,
In the file "administrator/components/com_hikashop/helpers/import/mijo.php" could you try to replace the two occurrences of :
By:
In the file "administrator/components/com_hikashop/helpers/import/mijo.php" could you try to replace the two occurrences of :
Code:
INSERT INTO `#__hikashop_category`
Code:
INSERT IGNORE INTO `#__hikashop_category`
Please Log in or Create an account to join the conversation.
11 years 5 months ago #197674
by Sigizmunt
Replied by Sigizmunt on topic Import from mijoshop error
It works, but there is another error 
Unknown column 'mjd.remaining' in 'field list' SQL=INSERT IGNORE INTO `w21aq_hikashop_download` (`file_id`,`order_id`,`download_number`) SELECT hkf.file_id,hko.order_id,(50- mjd.remaining) FROM `w21aq_mijoshop_download` AS mjd INNER JOIN `w21aq_mijoshop_download_description` mjdd ON mjd.download_id = mjdd.download_id INNER JOIN `w21aq_hikashop_file` AS hkf ON ( CONVERT(hkf.file_name USING utf8) = CONVERT(mjdd.name USING utf8) )INNER JOIN `w21aq_mijoshop_product_to_download` AS mjpd ON mjd.download_id = mjpd.download_id INNER JOIN `w21aq_mijoshop_order_product` AS mjop ON mjpd.product_id = mjop.product_id INNER JOIN `w21aq_hikashop_order` AS hko ON hko.order_mijo_id = mjop.order_id WHERE mjd.download_id > 0
Unknown column 'mjd.remaining' in 'field list' SQL=INSERT IGNORE INTO `w21aq_hikashop_download` (`file_id`,`order_id`,`download_number`) SELECT hkf.file_id,hko.order_id,(50- mjd.remaining) FROM `w21aq_mijoshop_download` AS mjd INNER JOIN `w21aq_mijoshop_download_description` mjdd ON mjd.download_id = mjdd.download_id INNER JOIN `w21aq_hikashop_file` AS hkf ON ( CONVERT(hkf.file_name USING utf8) = CONVERT(mjdd.name USING utf8) )INNER JOIN `w21aq_mijoshop_product_to_download` AS mjpd ON mjd.download_id = mjpd.download_id INNER JOIN `w21aq_mijoshop_order_product` AS mjop ON mjpd.product_id = mjop.product_id INNER JOIN `w21aq_hikashop_order` AS hko ON hko.order_mijo_id = mjop.order_id WHERE mjd.download_id > 0
Please Log in or Create an account to join the conversation.
11 years 5 months ago - 11 years 5 months ago #197680
by Sigizmunt
Replied by Sigizmunt on topic Import from mijoshop error
Ok. I've deleted
$sql = 'INSERT IGNORE INTO `#__hikashop_download` (`'.implode('`,`',array_keys($data)).'`) '.
'SELECT '.implode(',',$data).' FROM `#__mijoshop_download` AS mjd '.
'INNER JOIN `#__mijoshop_download_description` mjdd ON mjd.download_id = mjdd.download_id '.
'INNER JOIN `#__hikashop_file` AS hkf ON ( CONVERT(hkf.file_name USING utf8) = CONVERT(mjdd.name USING utf8) )'.
'INNER JOIN `#__mijoshop_product_to_download` AS mjpd ON mjd.download_id = mjpd.download_id '.
'INNER JOIN `#__mijoshop_order_product` AS mjop ON mjpd.product_id = mjop.product_id '.
'INNER JOIN `#__hikashop_order` AS hko ON hko.order_mijo_id = mjop.order_id '.
'WHERE mjd.download_id > '.$this->options->last_mijo_pfile;
$this->db->setQuery($sql);
$this->db->query();
$total = $this->db->getAffectedRows();
in "administrator/components/com_hikashop/helpers/import/mijo.php" and looks like import is over. But i can see only few categories from mijoshop, smallest categories. If i add an item to a cart and then remove it on the site, then i can see the list of all items i was need to import. They've been impoted! But i can't see them in admin panel. How i can see them there?
$sql = 'INSERT IGNORE INTO `#__hikashop_download` (`'.implode('`,`',array_keys($data)).'`) '.
'SELECT '.implode(',',$data).' FROM `#__mijoshop_download` AS mjd '.
'INNER JOIN `#__mijoshop_download_description` mjdd ON mjd.download_id = mjdd.download_id '.
'INNER JOIN `#__hikashop_file` AS hkf ON ( CONVERT(hkf.file_name USING utf8) = CONVERT(mjdd.name USING utf8) )'.
'INNER JOIN `#__mijoshop_product_to_download` AS mjpd ON mjd.download_id = mjpd.download_id '.
'INNER JOIN `#__mijoshop_order_product` AS mjop ON mjpd.product_id = mjop.product_id '.
'INNER JOIN `#__hikashop_order` AS hko ON hko.order_mijo_id = mjop.order_id '.
'WHERE mjd.download_id > '.$this->options->last_mijo_pfile;
$this->db->setQuery($sql);
$this->db->query();
$total = $this->db->getAffectedRows();
in "administrator/components/com_hikashop/helpers/import/mijo.php" and looks like import is over. But i can see only few categories from mijoshop, smallest categories. If i add an item to a cart and then remove it on the site, then i can see the list of all items i was need to import. They've been impoted! But i can't see them in admin panel. How i can see them there?
Last edit: 11 years 5 months ago by Sigizmunt.
Please Log in or Create an account to join the conversation.
11 years 5 months ago #198106
by Jerome
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.
Replied by Jerome on topic Import from mijoshop error
Hi,
Thanks for your feedback and report.
Which version of Mijoshop are you using ?
It looks like the table "mijoshop_download_description" has changed and does not have the column "remaining" anymore ; so I'm wondering where that information is now stored.
About the products, the best is to check in your backend.
It is possible that the product has been imported in the the root category instead of the right product category (which has not been imported for an unknown reason ; but if you say that few categories has been imported, I think that could explain the products in a wrong category)
Regards,
Thanks for your feedback and report.
Which version of Mijoshop are you using ?
It looks like the table "mijoshop_download_description" has changed and does not have the column "remaining" anymore ; so I'm wondering where that information is now stored.
About the products, the best is to check in your backend.
It is possible that the product has been imported in the the root category instead of the right product category (which has not been imported for an unknown reason ; but if you say that few categories has been imported, I think that could explain the products in a wrong category)
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.
Time to create page: 0.177 seconds