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
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | improve_line_item_type--2652948-1.patch | 786 bytes | guy_schneerson |
Comments
Comment #2
guy_schneerson commentedComment #3
artem_sylchukThanks 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.
Comment #4
artem_sylchukComment #6
das-peter commentedLooks good, thanks! :)