The task is simple enough: prefix all of our custom fields with commerce_ to avoid any possible collisions with other modules creating similarly named fields. This is quite a long shot, but seeing as how the Field module prefixes all of theirs with field_, we may as well do the same.

Comments

rszrama’s picture

Status: Active » Needs review

First pass here... putting it through some rigorous testing now.

https://github.com/rszrama/drupalcommerce/commit/abf040c551b319493e6d916...

rszrama’s picture

Added a couple of follow-up commits for missed field names. I'd appreciate additional review. : )

pcambra’s picture

I think there is one missing in commerce_line_item.rules.inc in function commerce_line_item_unit_price_currency_convert

$wrapper->commerce_unit_price->amount = commerce_currency_convert($wrapper->commerce_unit_price->amount->value(), $wrapper->unit_price->currency_code->value(), $currency_code);

Should be

$wrapper->commerce_unit_price->amount = commerce_currency_convert($wrapper->commerce_unit_price->amount->value(), $wrapper->commerce_unit_price->currency_code->value(), $currency_code);
rszrama’s picture

You're right... very sneaky that one, hiding off the edge of my screen. : P

Fixed that and leaving this open for further review.

rszrama’s picture

Status: Needs review » Fixed

I'm not seeing any follow-up errors here, so I'm assuming we got everything.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.