Release Version 0.2.8
Version 0.2.8
Change Log
- Events added
- wasPurchased Item attribute added.
Events
4 events added "Cart Checkout", "Order Placed", "Order Completed" and "Order Status Changed". Readme file has been updated explaining how to use them, though is like using any Laravel 5.1 event so we don't think this will be difficult to implement.
wasPurchased attribute
We have added a wasPurchased
attribute to the Item
model and to your custom Product
. This attribute will return a bool indicating if it was purchased by the current logged in user or not.
An example of how to use it:
if ($item->wasPurchased) {
echo 'I have been purchased by logged user!';
}
if ($myProduct->wasPurchased) {
echo 'I have been purchased by logged user!';
}
This check is made based on the order status codes that are set in the configuration file to indicate when something has been purchased.