PrestaShop Forum

The best place in the world to ask questions about PrestaShop and get advice from our passionate community!

PrestaShop Forum

Jump to content

 

[MODULE] Product Export Module v1.0 (UPDATED FOR 1.4) (free)

481 replies to this topic
#1
lmwood

    PrestaShop Apprentice

  • Members
  • PipPip
  • 87 posts
Hello all,

I've created an easy to use product export module which is free to download and use.

Export Products v1.0

Features
* Choose what to export by dragging and dropping from available fields.
* Choose how you want the export ordered by easily sorting the selected fields.
* Save an export so you can load your chosen fields again later.
* Clean easy to use interface.
* Language Select.
* Delimiter option.

UPDATE v1.0
Updated to work with prestashop 1.4.

UPDATE v0.5:
Added EAN13
Changed the export to stream the file instead of saving to disk. Should fix file permission problems.

UPDATE v0.4:
Changed the export folder to the upload folder in the root of prestashop to avoid permission issues.

UPDATE v0.3:
Added support for prestashop 1.1.
Hopefully fixed permissions problems by creating a seperate directory for csv file on install.
Fixed reinstall issues by adding a DROP if exists before the tables are created on install.

Download: Export Products v1.0

Please remember it should work for most versions of prestashop if not all. Also backup your database before doing any export/imports.

Attached Files


Edited by lmwood, 31 May 2012 - 01:14 PM.
0

http://lmwood.com - Free Prestashop Modules, etc.

#2
JAKCRABBIT

    PrestaShop Fanatic

  • Members
  • PipPipPipPip
  • 2592 posts
Wow, it look amazing, hurry i try it :)

Posted Image

ICQ: 275784332


#3
lmwood

    PrestaShop Apprentice

  • Members
  • PipPip
  • 87 posts
Thanks, Let me know how you get on.
http://lmwood.com - Free Prestashop Modules, etc.

#4
gra

    PrestaShop Newbie

  • Members
  • Pip
  • 11 posts
Using ver 1.25. Installs OK, but getting the following error when clicking configure.

Table 'prestashop.ps_export_set' doesn't exist

SELECT * FROM `ps_export_set`


-- Graham
-- Graham (www.bestbooksforkids.com.au)

#5
mohsart

    PrestaShop Addict

  • Members
  • PipPipPip
  • 749 posts
Great! :-)
However, some characters get garbled, eg the Swedish å, ä, and ö; I believe this can be sorted with utf8_decode() but don't see right away where to insert it...

/Mats
My blog about using PrestaShop
My shops: Spel (1.4.3) HandKraft (1.5.2)
I help for free, but you may donate a small sum via PayPal to shop@mohsart.se if you feel that I've been helpful

#6
lmwood

    PrestaShop Apprentice

  • Members
  • PipPip
  • 87 posts
Ok, I'll have a look into your problem Graham.

Also, I hadn't thought about different character sets. I shall update asap.
http://lmwood.com - Free Prestashop Modules, etc.

#7
lmwood

    PrestaShop Apprentice

  • Members
  • PipPip
  • 87 posts
Graham,

I'd left out the set table's sql from the install sql file.


CREATE TABLE IF NOT EXISTS `ps_export_set` (
`id` int(10) unsigned NOT NULL auto_increment,
`set_name` varchar(200) NOT NULL,
`set_values` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;


Running the above sql in phpMyAdmin should do the trick. If you dont have access to phpMyAdmin pm me and i'll help you out.
http://lmwood.com - Free Prestashop Modules, etc.

#8
lmwood

    PrestaShop Apprentice

  • Members
  • PipPip
  • 87 posts
I've added utf8_decode() to the exportproducts.php file. Just download a new copy and upload the exportproducts.php file.

Could you let me know if thats fixed the character encoding issues :)
http://lmwood.com - Free Prestashop Modules, etc.

#9
mohsart

    PrestaShop Addict

  • Members
  • PipPipPip
  • 749 posts
Yes, works perfect now.
Great job :-)

/Mats
My blog about using PrestaShop
My shops: Spel (1.4.3) HandKraft (1.5.2)
I help for free, but you may donate a small sum via PayPal to shop@mohsart.se if you feel that I've been helpful

#10
junnecito

    PrestaShop Fanatic

  • Moderators
  • 1339 posts
Hi Imwood:
Thanks for this nice module, will be posible to upload pics also?
Thanks again

#11
gra

    PrestaShop Newbie

  • Members
  • Pip
  • 11 posts
Still having some issues. Getting to the configure page now but seeing:

Notice: Undefined index: export_data in D:\localhost\www\bestbooksforkids\modules\exportproducts\exportproducts.php on line 83

Should clarify that I am running a test site (locally using Wampserver), and I have had issues (resolved I hoped) with my database due to hung Prestashop upgrade in the past.

- Graham
-- Graham (www.bestbooksforkids.com.au)

#12
lmwood

    PrestaShop Apprentice

  • Members
  • PipPip
  • 87 posts
Graham,

Thats just a notice to tell you that my coding isnt the best practice at that part in the script. I'll quickly ammend my sloppy code.

Cheers,
Lee.
http://lmwood.com - Free Prestashop Modules, etc.

#13
Jaap Visser

    PrestaShop Apprentice

  • Members
  • PipPip
  • 28 posts
Still have this issue:

SELECT * FROM `ps_export_fields`

Please help me out :)

#14
lmwood

    PrestaShop Apprentice

  • Members
  • PipPip
  • 87 posts
Updated once again, download a new copy and overwrite the files and you shouldn't see that error notice.
http://lmwood.com - Free Prestashop Modules, etc.

#15
Jaap Visser

    PrestaShop Apprentice

  • Members
  • PipPip
  • 28 posts
Still the same problem: SELECT * FROM `ps_export_fields` :S

#16
lmwood

    PrestaShop Apprentice

  • Members
  • PipPip
  • 87 posts
Jaap Visser,

Could you be more specific please. It's hard for me to know the exact cause. Its more than likely that the install has failed.
http://lmwood.com - Free Prestashop Modules, etc.

#17
Jaap Visser

    PrestaShop Apprentice

  • Members
  • PipPip
  • 28 posts
I've download the new version...
Install it in the back office...
Try to run the module and get this screen notice:
-----------------------------------------------------------
Table 'prestashop.ps_export_fields' doesn't exist

SELECT * FROM `ps_export_fields`
-----------------------------------------------------------

#18
lmwood

    PrestaShop Apprentice

  • Members
  • PipPip
  • 87 posts
If you have phpMyAdmin or another tool you can run an sql command in then please run the following code on your database.


CREATE TABLE IF NOT EXISTS `ps_export_fields` (
`id` int(10) NOT NULL auto_increment,
`field_name` varchar(50) NOT NULL,
`database_name` varchar(50) NOT NULL,
`category` varchar(50) NOT NULL,
`position` int(2) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;

CREATE TABLE IF NOT EXISTS `ps_export_set` (
`id` int(10) unsigned NOT NULL auto_increment,
`set_name` varchar(200) NOT NULL,
`set_values` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;

INSERT INTO `ps_export_fields` (`id`, `field_name`, `database_name`, `category`, `position`) VALUES
(1, 'Product Id', 'id_product', 'products', 0),
(2, 'Product Reference', 'reference', 'products', 0),
(3, 'Name', 'name', 'products_lang', 0),
(4, 'Short Description', 'description_short', 'products_lang', 0),
(5, 'Long Description', 'description', 'products_lang', 0),
(6, 'Quantity', 'quantity', 'products', 0),
(7, 'Price', 'price', 'products', 0),
(8, 'Wholesale Price', 'wholesale_price', 'products', 0),
(9, 'Supplier Name', 'id_supplier', 'products', 0),
(10, 'Manufacturer', 'id_manufacturer', 'products', 0),
(11, 'Tax %', 'id_tax', 'products', 0),
(12, 'Categories', 'id_category_default', 'products', 0),
(13, 'On Sale', 'on_sale', 'products', 0),
(14, 'Reduction Price', 'reduction_price', 'products', 0),
(15, 'Reduction %', 'reduction_percent', 'products', 0),
(16, 'Reduction From', 'reduction_from', 'products', 0),
(17, 'Reduction To', 'reduction_to', 'products', 0),
(18, 'Supplier Reference', 'supplier_reference', 'products', 0),
(19, 'Weight', 'weight', 'products', 0),
(20, 'Date Added', 'date_add', 'products', 0),
(21, 'Active', 'active', 'products', 0),
(22, 'Meta Title', 'meta_title', 'products_lang', 0),
(23, 'Meta Description', 'meta_description', 'products_lang', 0),
(24, 'Meta Keywords', 'meta_keywords', 'products_lang', 0),
(25, 'Available Now', 'available_now', 'products_lang', 0),
(26, 'Available Later', 'available_later', 'products_lang', 0),
(27, 'Tags', 'tags', 'products', 0),
(28, 'Accessories', 'accessories', 'products', 0);

http://lmwood.com - Free Prestashop Modules, etc.

#19
gra

    PrestaShop Newbie

  • Members
  • Pip
  • 11 posts
Getting further for me. No errors anymore. Can install / uninstall ok. Attached picture shows what I see. (Nothing to click?)

- Graham

Attached Files


-- Graham (www.bestbooksforkids.com.au)

#20
Jaap Visser

    PrestaShop Apprentice

  • Members
  • PipPip
  • 28 posts
Oke done the SQL thing, but now the same screen as GRA...