During #2831613: Meta: Product bundle price resolution I stubled upon some inconsistencies in our current implementation. If we have a freshly instantiated BundleItem, we blow away by calling methods, that require variations to be there (getUnitPrice).

ATM this is:
::getDefaultVariation()
::getCurrentVariation()
::getUnitPrice()

So we have to Options.

a) Check if we have a product reference or some variations before doing the logic in these three methods.
b) Overwrite the constructor and require product or variations at instatiation time.

I think a) is what is more DI friendly. Lets just make sure we don't fatal if the BundleItem issed fully setup.

Any thoughts?

Comments

olafkarsten created an issue. See original summary.

  • olafkarsten committed d62652f on 8.x-1.x
    Issue #2929653 by olafkarsten: Adjust Bundle Item Interface and...

Status: Fixed » Closed (fixed)

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