Closed (fixed)
Project:
Commerce Feeds
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 May 2012 at 16:54 UTC
Updated:
8 Jun 2012 at 19:31 UTC
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