public function FeedsCommercePricelistItemProcessor::getMappingTargets in Commerce Pricelist 7
Return available mapping targets.
File
- commerce_pricelist_feeds/
plugins/ FeedsCommercePricelistItemProcessor.inc, line 134 - FeedsUserProcessor class.
Class
- FeedsCommercePricelistItemProcessor
- Feeds processor plugin. Create users from feed items.
Code
public function getMappingTargets() {
$targets = parent::getMappingTargets();
$targets += array(
'sku' => array(
'name' => t('Product SKU'),
'description' => t('The product identifier.'),
),
'valid_from' => array(
'name' => t('Valid from'),
'description' => t('Unix timestamp'),
),
'valid_to' => array(
'name' => t('Valid to'),
'description' => t('Unix timestamp'),
),
'price_amount' => array(
'name' => t('Price amount'),
'description' => t('In minor currency (€1,00 = 100)'),
),
'currency_code' => array(
'name' => t('Currency code'),
'description' => t('USD'),
),
'quantity' => array(
'name' => t('Quantity'),
'description' => t('Lower quantity limit for this unit price'),
),
'pricelist_id' => array(
'name' => t('Price list id'),
'description' => t('Price list ID'),
),
'pricelist_title' => array(
'name' => t('Price list title'),
'description' => t('Name of the price list, first match'),
'callback' => 'commerce_pricelist_feeds_set_target',
),
);
// UUID module support plus support for mappings set up before beta version.
if (module_exists('uuid')) {
$targets += array(
'pricelist_uuid' => array(
'name' => t('Price list uuid'),
'description' => t('Generated Unique ID'),
'callback' => 'commerce_pricelist_feeds_set_target',
),
);
}
// Let other modules expose mapping targets.
self::loadMappers();
$entity_type = $this
->entityType();
$bundle = $this
->bundle();
drupal_alter('feeds_processor_targets', $targets, $entity_type, $bundle);
return $targets;
}