Hi!
I installed commerce good relations module today and it works really out of the box even with latest drupal and conmerce 7.x versions.
Regarding the formatted amount strategy, note that some currencies do not have decimals. So dividing by 100 as in current code just generate a wrong value.
@line 38
$variables['commerce_goodrelations_metadata']['price'] = $commerce_price['amount'] / 100;
should more be something like
check_plain(round(commerce_currency_amount_to_decimal($commerce_price['amount'] , $commerce_price['currency_code']),2));
commerce_currency_amount_to_decimal is called within commerce_currency_format() function but I used this one to only get the price and not others (currency code, ...)
Regards,
Julien.
Comments