Having had a brief look at your code, it doesn't appear as though custom purchasables are supported when the notice type is 'Products in Cart'. I was wondering whether you might be willing to implement support for this as I could really use it for an upcoming project.
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 code and interface for the Promotions section in Commerce. Discounts and Sales can utilise both standard products and custom purchasables. It's should be a pretty straight forward implementation to support it since both a standard Commerce purchasable (i.e. product variant) and custom purchasable extend the same base functionality/class.
Thanks.
Having had a brief look at your code, it doesn't appear as though custom purchasables are supported when the notice type is 'Products in Cart'. I was wondering whether you might be willing to implement support for this as I could really use it for an upcoming project.
Some examples of custom purchasables are:
All custom purchasables extend the same
craft\commerce\base\Purchasableclass. 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 code and interface for the Promotions section in Commerce. Discounts and Sales can utilise both standard products and custom purchasables. It's should be a pretty straight forward implementation to support it since both a standard Commerce purchasable (i.e. product variant) and custom purchasable extend the same base functionality/class.
Thanks.