7

I have a Drupal 7 site and installed the Drupal Commerce module. In which I have added Commerce Product with Category like:

  • Software Products
  • Hardware Products
  • Electronics
  • Others

I would like to Export those Commerce Products from My Development Server to Production Server.

So, for that we have any modules available in Drupal.org so, I can export the Commerce Products and Import to my server.

I found the Node_Export module, but it only applies to exporting the nodes. It does not apply to Commerce Products.

Anyone has an idea how I can Import/Export the Commerce Module Products? I think it is general problem who are using the Commerce Module of Product (but not sure).

  • You can look at this Answer – NullPointer Sep 28 '13 at 5:21
  • Is there any module which will allow user to Export the Data in CSV/XML Format for Commerce Products? – AshwinP Sep 28 '13 at 6:20
  • @AshwinP: yes there is such module ... checkout my answer I just added to this question. PS: same reply for "JSON" (instead of CSV or XML). – Pierre.Vriens Dec 23 '15 at 11:10
2

You can look at the Commerce Feeds module in Drupal

You can use this Views Data Export module to Export in CSV or Excel Format. Further read more details on that module for installation and configuration.

You can also watch View Tutorial

  • Okay, Let me check your suggestion. – AshwinP Sep 28 '13 at 5:31
  • 1
    in addition try this module drupal.org/project/commerce_feedsmulti – Bala Sep 28 '13 at 5:38
  • @Bala First thing I have installed the module commerce_feedsmulti and Enable module where I can see the options for Export Commerce Products to Export the data or Import Commerce Products. – AshwinP Sep 28 '13 at 5:51
  • You can see edited answer – NullPointer Sep 28 '13 at 6:26
  • "Feeds", "commerce feeds", and "feeds tamper" modules all work nicely together. – DraganAscii Jul 3 '18 at 12:49
2

Commerce Feeds multitype

Commerce Feeds multitype provides an additional Feeds processor that can create different types of products in one import. It provides mapping targets for the product type and any fields attached to any product type. If you're updating an existing product, any product type data in the source will be ignored.

enter image description here

  • First thing I have installed the module commerce_feedsmulti and Enable module where I can see the options for Export Commerce Products to Export the data or Import Commerce Products. – AshwinP Sep 28 '13 at 5:52
  • See the picture, it mentioned there. – Bala Sep 28 '13 at 5:54
  • see this drupalcommerce.org/node/467 – Bala Sep 28 '13 at 6:04
  • Let me check and try to create feeds and import from CSV. But Can we export the data from existing Commerce Product to CSV? So, I can Import as CSV Feeds to my Other Domain. This is fantastic to import Products from CSV. But Also My Question is how can I Export the Commerce Products from Other Domain where Drupal 7 Store 1 as CSV and Import to my Drupal 7 Store 2 suppose. – AshwinP Sep 28 '13 at 6:14
  • 2
    This module is very much helpful to export data as CSV. drupal.org/project/views_data_export – AshwinP Sep 28 '13 at 6:54
1

There is a great explanation here about exporting from Views both the Products and the Product Displays and then importing using Feeds and associated modules.

So to export those products, we first create a view containing the products and then export this view via Views data export into CSV file.

  1. Install views_data_export and dependent modules

    drush en views_data_export image_url_formatter
    
  2. Create a view with products you like to export.

  3. Configure View for export (Data export).
  4. Generate the file via drush command, e.g.

    drush views-data-export --format=csv VIEW-NAME VIEW-DISPLAY-NAME exports/product-exports/theme_export_Jan11_2014.csv --quote-values --strict=0 --header-row
    

To import:

  1. Install commerce_feeds module and its dependent modules, e.g.

    drush en feeds feeds_ui commerce_feeds
    
  2. Create New Feed Importer.

  3. Run import.

    Go to /import URL, use the Product Importer and import your products.

Similar goes for Product Displays.

See also:

1

Another option that might work to export any data from any Drupal database table is to use the export capabilities of the Forena module (it comes with quite some community documentation).

About Forena: it is built of the idea of using SQL to get data out of a database (which can be the Drupal database or an external one such as My SQL, Oracle, MS SQL, ...) and use XHTML and CSS to format it into web reports. Visit the Forena HowTos page for some links (near the bottom) to some live demo / showcase links.

Exporting data

Any report can be exported (saved) in various file formats, such as CSV, XLS, PDF, DOC, ... To do so, just add an extention to the report (output) URL that corresponds to the format you want (like .csv for CSV format). That contains the equivalent of that report (in the requested format). As a sample, consider the sample report located at /reports/sample.states (in your own site, one of the samples shipped with Forena). Change the URL to /reports/sample.states.csv (= just add .csv to it) to get the same report in .csv format. If you'd add such .csv to the URL of the Simple Table of States in the demo site, the result is like so ...

Same technique applies for other supported extensions (export formats), such as adding .html, .xls (MS Excell), .pdf or .doc (MS Word).

By the way, all data blocks are accessible directly via their url also, provided you have permission to access that block. Here are a few samples of that, for the sample report located at /reports/sample.states:

For short, to answer this specific answer I'd write the various (custom) SQLs I need, format it as reports that fit my needs, and then just save it as a CSV (Or XML? Or JSON?).

Importing data

Using the Forena integration with the Feeds module it is possible to import data blocks.

For a tutorial about the available features check out the video about How to import data and reports based on data as Drupal nodes.

Disclosure: I'm a co-maintainer of the module.

0

The best way to export/import products is features. You will need to use uuid, uuid_features and commerce_uuid modules to archive this.

0

Try the latest UUID Features and Commerce UUID modules which allows you to export the Commerce products (see: uuid_commerce_product.features.inc).

Commerce product export using UUID Features and Commerce UUID

Image source: #1982738 at DO

  • Above doesnt work anymore. – Marko Blazekovic Jun 4 '16 at 8:36
  • Try with the dev version, maybe it's not yet in the stable. If it is, then try to report a bug. – kenorb Jun 4 '16 at 14:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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