4

I have created custom gallery extension but I need to implement an import and export or gallery data in the CSV Format.

I did too much research but couldn't find any useful link to find solution so please let me know if anybody had idea for this.

2
  • more details are helpful. Do you use the catalog_product_gallery functionality or your own database? Do you just want the data? Mar 14, 2013 at 15:27
  • Alex's solution below is the answer - please mark as accepted.
    – philwinkle
    May 16, 2013 at 4:29

1 Answer 1

4

For a CSV exports you can generate a grid with your data and use the getCsv() function. Sounds overhead, but that's exactly what the export of the Tablerates shipping cost table in the backend does.

See: Mage_Adminhtml_System_ConfigController::exportTableratesAction and Mage_Adminhtml_Block_Shipping_Carrier_Tablerate_Grid.

For the import you could also have a look at this module (Mage_Shipping_Model_Resource_Carrier_Tablerate::uploadAndImport) or on the import module for product data (Mage_ImportExport), but this is much more complicated.

1
  • Can you please mark this answer as your solution, or do you have unaswered problems? Mar 25, 2013 at 9:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.