I am getting a strange error wen Commerce Physical Product, shipping and coupons are enabled.
I could not find anything wrong with the code but by process of elimination I have narrowed it down to the ""Order total weight comparison" rules condition.
Looking through the code I could not spot anything wrong with it. However I did notice the line $line_item_wrapper->type->value() and while not wrong I found that replacing it with $line_item_wrapper->getBundle() fixes some unexplained errors that are not directly relatd to a module. I have replaced the line and problam was solved.
I am aware this may not be a bug in the Physical Product itself but using the getBundle() should improve comparability and I belive makes for better coding.
Patch to follow

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

guy_schneerson created an issue. See original summary.

guy_schneerson’s picture

Status: Active » Needs review
FileSize
786 bytes
artem_sylchuk’s picture

Thanks a lot, patch really helped me. I was close to despair debugging line item wrappers without even a smallest idea what is wrong. You really saved my time. I think this can be marked as RTBC.

artem_sylchuk’s picture

Status: Needs review » Reviewed & tested by the community

das-peter’s picture

Status: Reviewed & tested by the community » Fixed

Looks good, thanks! :)

Status: Fixed » Closed (fixed)

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