You are here

drupal-commerce

Importing a price in Drupal 8 for Drupal Commerce 2.x

Just a quick note that if you're importing a Commerce price:

  • you must set the currency_code.
  • what was commerce_price in DC 1.x / Drupal 7 is now just price.
  • the number can be a decimal now.

    'price/number': SomeFieldName 'price/currency_code': plugin: default_value default_value: 'USD'

Note that you can also set up a constant in the migration definition and use the constant value: