Closed drewroberts closed 3 years ago
Instead of a trait, this was implemented using a base Sellable
interface that is extended for different types of sellable items. Models that are sellable declare they implement the appropriate interface and add any methods the interface requires. Cart items and order items contain a morph to the sellable model.
https://github.com/tipoff/support/tree/main/src/Contracts/Sellable
Create a trait to allow the checkout (Cart with Cart Items) to be added to packages as Sellable items:
There will also be other packages in the future with other variations of sellable items that can be added to a cart and process through the checkout in an order.