rawkinrich Posted October 22, 2010 Share Posted October 22, 2010 Hi all,How do I export the database? Is it possible to export the database of categories/products to CSV?Thanks all Link to comment Share on other sites More sharing options...
rocky Posted October 23, 2010 Share Posted October 23, 2010 You can use phpMyAdmin to export all the tables starting with ps_category and ps_product in CSV format, but it won't be the same format that PrestaShop uses to import CSV files. You can't export your products in CSV format, then modify them, then re-import them. It is a requested feature though and PrestaShop have marked it as "For future consideration", so it may be added to a future version of PrestaShop. Link to comment Share on other sites More sharing options...
Pinkloveshy Posted January 29, 2011 Share Posted January 29, 2011 RockyI have a current shop in 1.2.4 with all my products loaded in the database. I now want to move these to a fresh install of 1.4.10 with new database. Is there a way to do this without having to re-enter all my products again.Any advise form Rocky or another experienced person is most welcomeThanksPinkloveshy Link to comment Share on other sites More sharing options...
rocky Posted January 29, 2011 Share Posted January 29, 2011 You must run the installer and run the "Update" option. You can't simply perform a clean install, then transfer the products over, since they will be in the wrong format. Make a backup of your files and database first in case the upgrade fails, so you can restore your previous state. Link to comment Share on other sites More sharing options...
Pinkloveshy Posted January 29, 2011 Share Posted January 29, 2011 RockyFollowed the procedure to upgrade 1.2.4 to 1.4.10 and the install took a little while which was looking promising, then came up with the usual 27 sql errors. I've been at this all afternoon is there a sure way of ensuring success?SET NAMES 'utf8'SET NAMES 'utf8'/* ##################################### */ /* STRUCTURE */ /* ##################################### */ ALTER TABLE `ps_product` CHANGE `reduction_from` `reduction_from` DATE NOT NULL DEFAULT '1970-01-01', CHANGE `reduction_to` `reduction_to` DATE NOT NULL DEFAULT '1970-01-01'ALTER TABLE `ps_order_detail` CHANGE `tax_rate` `tax_rate` DECIMAL(10, 3) NOT NULL DEFAULT '0.000'ALTER TABLE `ps_group` ADD `price_display_method` TINYINT NOT NULL DEFAULT 0 AFTER `reduction`CREATE TABLE `ps_carrier_group` ( `id_carrier` int(10) unsigned NOT NULL, `id_group` int(10) unsigned NOT NULL, UNIQUE KEY `id_carrier` (`id_carrier`,`id_group`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8(1050) Table 'ps_carrier_group' already existsALTER TABLE `ps_country` ADD `need_identification_number` TINYINT( 1 ) NOT NULLALTER TABLE `ps_customer` ADD `dni` VARCHAR( 16 ) NULL AFTER `firstname`ALTER TABLE `ps_image` ADD INDEX `product_position` (`id_product`, `position`)ALTER TABLE `ps_hook_module` ADD INDEX `id_module` (`id_module`)ALTER TABLE `ps_customer` ADD INDEX `id_customer_passwd` (`id_customer`, `passwd`)ALTER TABLE `ps_tag` ADD INDEX `id_lang` (`id_lang`)ALTER TABLE `ps_customer_group` ADD INDEX `id_customer` (`id_customer`)ALTER TABLE `ps_category_group` ADD INDEX `id_category` (`id_category`)ALTER TABLE `ps_image` ADD INDEX `id_product_cover` (`id_product`, `cover`)ALTER TABLE `ps_employee` ADD INDEX `id_employee_passwd` (`id_employee`, `passwd`)ALTER TABLE `ps_product_attribute` ADD INDEX `product_default` (`id_product`, `default_on`)ALTER TABLE `ps_product_download` ADD INDEX `product_active` (`id_product`, `active`)ALTER TABLE `ps_tab` ADD INDEX `class_name` (`class_name`)ALTER TABLE `ps_module_currency` ADD INDEX `id_module` (`id_module`)ALTER TABLE `ps_product_attribute_combination` ADD INDEX `id_product_attribute` (`id_product_attribute`)ALTER TABLE `ps_orders` ADD INDEX `invoice_number` (`invoice_number`)ALTER TABLE `ps_product_tag` ADD INDEX `id_tag` (`id_tag`)ALTER TABLE `ps_cms_lang` CHANGE `id_cms` `id_cms` INT(10) UNSIGNED NOT NULLALTER TABLE `ps_tax` CHANGE `rate` `rate` DECIMAL(10, 3) NOT NULLALTER TABLE `ps_order_detail` ADD `discount_quantity_applied` TINYINT(1) NOT NULL DEFAULT 0 AFTER `ecotax`ALTER TABLE `ps_orders` ADD `total_products_wt` DECIMAL(10, 2) NOT NULL AFTER `total_products`/* ##################################### */ /* CONTENTS */ /* ##################################### */ UPDATE `ps_group` SET `price_display_method` = (SELECT `value` FROM `ps_configuration` WHERE `name` = 'PS_PRICE_DISPLAY')UPDATE `ps_configuration` SET `value` = ROUND(value / (1 + ( SELECT rate FROM ( SELECT t.`rate`, COUNT(*) n FROM `ps_orders` o LEFT JOIN `ps_carrier` c ON (o.`id_carrier` = c.`id_carrier`) LEFT JOIN `ps_tax` t ON (t.`id_tax` = c.`id_tax`) WHERE c.`deleted` = 0 AND c.`shipping_handling` = 1 GROUP BY o.`id_carrier` ORDER BY n DESC LIMIT 1 ) myrate ) / 100), 6) WHERE `name` = 'PS_SHIPPING_HANDLING'DELETE FROM `ps_configuration` WHERE `name` = 'PS_PRICE_DISPLAY'DELETE FROM `ps_product_attachment` WHERE `id_product` NOT IN (SELECT `id_product` FROM `ps_product`)DELETE FROM `ps_discount_quantity` WHERE `id_product` NOT IN (SELECT `id_product` FROM `ps_product`)DELETE FROM `ps_pack` WHERE `id_product_pack` NOT IN (SELECT `id_product` FROM `ps_product`) OR `id_product_item` NOT IN (SELECT `id_product` FROM `ps_product`)DELETE FROM `ps_product_sale` WHERE `id_product` NOT IN (SELECT `id_product` FROM `ps_product`)DELETE FROM `ps_scene_products` WHERE `id_product` NOT IN (SELECT `id_product` FROM `ps_product`)DELETE FROM `ps_search_index` WHERE `id_product` NOT IN (SELECT `id_product` FROM `ps_product`)DELETE FROM `ps_search_word` WHERE `id_word` NOT IN (SELECT `id_word` FROM `ps_search_index`)DELETE FROM `ps_tag` WHERE `id_lang` NOT IN (SELECT `id_lang` FROM `ps_lang`)DELETE FROM `ps_search_word` WHERE `id_lang` NOT IN (SELECT `id_lang` FROM `ps_lang`)INSERT INTO `ps_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PRESTASTORE_LIVE', 1, NOW(), NOW()), ('PS_SHOW_ALL_MODULES', 0, NOW(), NOW()), ('PS_BACKUP_ALL', 0, NOW(), NOW()), ('PS_1_3_UPDATE_DATE', NOW(), NOW(), NOW()), ('PS_PRICE_ROUND_MODE', 2, NOW(), NOW())INSERT INTO `ps_hook` (`name`, `title`, `description`, `position`) VALUES ('createAccountTop', 'Block above the form for create an account', NULL , '1'), ('backOfficeHeader', 'Administration panel header', NULL , '0'), ('backOfficeTop', 'Administration panel top hover the tabs', NULL , '1'), ('backOfficeFooter', 'Administration panel footer', NULL , '1')INSERT INTO `ps_carrier_group` (id_carrier, id_group) (SELECT id_carrier, id_group FROM `ps_carrier` c, `ps_group` g WHERE c.active = 1)(1062) Duplicate entry '1-1' for key 1/* PHP */ /* PHP:convert_product_price(); */SET NAMES 'utf8'/* ##################################### */ /* STRUCTURE */ /* ##################################### */ ALTER TABLE `ps_product_attachment` CHANGE `id_product` `id_product` INT(10) UNSIGNED NOT NULL, CHANGE `id_attachment` `id_attachment` INT(10) UNSIGNED NOT NULLALTER TABLE `ps_attribute_impact` CHANGE `id_product` `id_product` INT(11) UNSIGNED NOT NULL, CHANGE `id_attribute` `id_attribute` INT(11) UNSIGNED NOT NULLALTER TABLE `ps_block_cms` CHANGE `id_block` `id_block` INT(10) UNSIGNED NOT NULL, CHANGE `id_cms` `id_cms` INT(10) UNSIGNED NOT NULLALTER TABLE `ps_customization` CHANGE `id_cart` `id_cart` int(10) unsigned NOT NULL, CHANGE `id_product_att Link to comment Share on other sites More sharing options...
rocky Posted January 30, 2011 Share Posted January 30, 2011 It looks like there are duplicate entries in your database. PrestaShop v1.2.4 allowed duplicate entries, but PrestaShop v1.3 doesn't. You should restore a backup of PrestaShop v1.2.4, then remove duplicate entries from the ps_carrier_group table and any other tables that had duplicate entry errors in the SQL log. Link to comment Share on other sites More sharing options...
Pinkloveshy Posted January 30, 2011 Share Posted January 30, 2011 Thanks RockyNot sure how I do this but I'll give it a go.RegardsPinkloveshy Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now