Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When setting the mappings for a Commerce Product processor, if the Price:Currency mapping appears in the list before Price:Amount, the currency in the feed is replaced with the default currency. This is because Price:Currency is first in the evaluation order.
I suggest changing line 68 of commerce_price.inc
$field[LANGUAGE_NONE][$i]['currency_code'] = $currency;
to
if ( !isset( $field[LANGUAGE_NONE][$i]['currency_code'] ) ) {
$field[LANGUAGE_NONE][$i]['currency_code'] = $currency;
}
Comments
Comment #1
pcambraNice catch!
I've changed a little the code so it only runs if the subfield is amount and made the entity type not hardcoded