• Register
Plug-in Tutorial Build an EC-CUBE plug-in

Top Commentators

114

1

EC Mike

SHOGUNSHOGUN

32

2

hrbabu

SAMURAISAMURAI

29

3

Sumant Jha

SAMURAISAMURAI

29

4

justcubed

SAMURAISAMURAI

21

5

Ashok Kafle

SAMURAISAMURAI

21

6

shahith

SAMURAISAMURAI

14

7

Jeemusu

KABUKIKABUKI

14

8

Yangsin

KABUKIKABUKI

9

9

Zaw Hlaing Bwar

GEISYAGEISYA

8

10

Fei Liu

GEISYAGEISYA

Ranking Key

  • FUJISANFUJISAN1,000+ posts
  • SAKURASAKURA500+ posts
  • SHOGUNSHOGUN100+ posts
  • NINJYANINJYA50+ posts
  • SAMURAISAMURAI20+ posts
  • KABUKIKABUKI10+ posts
  • GEISYAGEISYALess than 10 posts

Generate a custom CSV file in admin

0 votes
In the EC-Cube admin panel, how does the CSV generation work? I'm trying to create a new button to generate a custom CSV with fields of my choosing., but can't quite seem to figure out how this is done. I've been looking at SC_Helper_CSV.php and LC_Page_Admin_Contents_CSV.php. It seems the info to be displayed is being pulled from dtb_csv, but I can't figure out how to modify this array.

Any clarification would be great. Thanks!
asked 2013-08-22 by justcubed (1,120 points) SAMURAISAMURAI

1 Answer

+1 vote
Hello Justcubed,

Are you just interested in retrieving selected data and populating a CSV file?

If so, I would call the below function in SC_Helper_CSV.php:

sfDownloadCsvFromSql($sql, $arrVal, $this->arrSubnavi[$csv_id], $arrOutput['disp_name'], $is_download);

Just set the $sql param to the data you want to grab.

Good luck!

Michael
answered 2013-08-26 by EC Mike (6,360 points) SHOGUNSHOGUN
...