You are here

function product_node_import_fields in Node import 5

Implementation of hook_node_import_fields().

File

supported/ecommerce/product.inc, line 12
Support file for product.module of the e-commerce module bundle.

Code

function product_node_import_fields($type) {
  if (_product_node_import_is_product($type)) {
    $fields = array(
      'title' => t('Product: Name'),
      'body' => t('Product: Description'),
      'price' => t('Product: Price'),
      'sku' => t('Product: Product identifier (SKU)'),
      'hide_cart_link' => t('Product: "Add to cart" link'),
    );
    if (variable_get('payment_recurring', 0)) {
      $fields['price_interval'] = t('Product: Billing cycle - price interval');
      $fields['price_unit'] = t('Product: Billing cycle - interval unit');
      $fields['price_cycle'] = t('Product: Billing cycle - number of payments cycles');
    }
    if ($type != 'product') {
      $fields = array_merge($fields, node_import_fields('product'));
    }
    return $fields;
  }
}