onyourmarks-agency / craft-commerce-product-bundles

Combine multiple products into a purchasable bundle to sell these for a special price.
Other
0 stars 2 forks source link

Add custom purchasable support #5

Open timeverts opened 4 years ago

timeverts commented 4 years ago

Having had a brief look at your code, unless I'm mistaken, it doesn't appear as though custom purchasables can be included within product bundles.

Some examples of custom purchasables are:

All custom purchasables extend the same craft\commerce\base\Purchasable class. The default Commerce product (which is actually a Variant) extends this class too, so it's really a custom purchasable itself.

If you want to see an example of supporting custom purchasables, take a look at the Promotions section in Commerce.

jerome2710 commented 4 years ago

Thank you for your description, I think you are right. I will look into this and try to fix it.

timeverts commented 4 years ago

@jerome2710, do you still have plans/capability to implement custom purchasable support?

jerome2710 commented 4 years ago

@timeverts I have looked briefly into this. Given the fact that for product bundles you would like to give the user the ability to pick a variant, it is not possible to migrate to purchasables. A product is not a purchasable, but the variants underneath it are. Therefore I got stuck finding the correct relations.

If you have a suggestion, I'm happy to look into this again.