Import and synchronize Drupal commerce content using Commerce feeds
1. Import & synch content
with Feeds and Comerce
Commerce Drupalcamp, Switzerland 2-3-4, 2011
2. About me
● Drupal developer at
Commerce Guys
● Active member of Spanish
and Catalan Drupal
Community Pedro Cambra
@pcambra
3. Feeds module
Feeds is a module that allows to import and
synchronize content into Drupal using a
pluggable system.
With feeds you can import really diverse
sources (XML, RSS, CSV, etc) into nodes,
users, terms, etc.
5. Feeds' components
Feeds splits its functionallity into three basic
components:
● Fetcher – Gets the content from the source.
● Parser – Parses raw content into arrays.
● Processor – Target entities get greated and
field mappings assigned.
Reference: feeds cheatsheet for developers.
6. Commerce Entities and Fields
Product Price Order
Product
reference Line item Line item Customer profile
reference reference
(Node) Payment Customer
transaction profile
7. Display vs Product
Drupal Commerce introduces a new entity type
called Product to store specific product data as
SKU, price, etc and links it to Product Displays
which are nodes that are actually displayed to the
user.
8. Commerce Feeds
Commerce Feeds plugs into Feeds module to
provide a way to import both products and
customer profiles and also provides a mapper
for product prices and another for product
references.
10. Feeds Tamper
Feeds tamper module provides a plugin for feeds
so users and developers can modify data
imported before it gets saved.
You can add operations such as replacements,
filters, array explodes/implodes using the UI that
feeds tamper provides.
12. Feeds API
Feeds module also provides some tools for
developers, you can declare new fetchers or
processors, and also hook before data is saved or
parsed using feeds API.
More info at the Developers Guide to Feeds.
13. Commerce Migrate
Commerce Migrate is a really powerful alternative
to the Feeds approach to import data but using
Migrate module.
It provides all the tools required to import
commerce entities and fields and also a
submodule for importing Ubercart 6.x or 7.x into
Commerce.