Releases: duncanmcclean/simple-commerce
v1.0.0-beta.20
- Improvements to Notifications - You can now choose what channels notifications are sent to, easier to customise.
- Refunds are again possible!
- You can now choose which filesystem receipts are stored in
- Fixed various permission issues in the Control Panel
- Fixed an issue that happened when a customer wasn't assigned to an order
- Fixed an issue where carts were created even though no items were added
laravel/slack-notification-channel
is now a dev dependency
Upgrade Guide
There's a little bit of stuff needed to do when upgrading to this release.
- Migrate your database
php artisan migrate
- Replace the current
notifications
array in yourconfig/simple-commerce.php
file with this.
/**
* Notifications
*
* Configure what notifications we send and who we
* send them to.
*/
'notifications' => [
'notifications' => [
\DoubleThreeDigital\SimpleCommerce\Events\BackOffice\NewOrder::class => ['mail'],
\DoubleThreeDigital\SimpleCommerce\Events\BackOffice\VariantOutOfStock::class => ['mail'],
\DoubleThreeDigital\SimpleCommerce\Events\BackOffice\VariantStockRunningLow::class => ['mail'],
\DoubleThreeDigital\SimpleCommerce\Events\OrderRefunded::class => ['mail'],
\DoubleThreeDigital\SimpleCommerce\Events\OrderStatusUpdated::class => ['mail'],
\DoubleThreeDigital\SimpleCommerce\Events\OrderSuccessful::class => ['mail'],
],
'mail' => [
'to' => 'hello@example.com',
'from' => [
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
'name' => env('MAIL_FROM_NAME', 'Example'),
],
],
'slack' => [
'webhook_url' => '',
],
],
v1.0.0-beta.19
- Added PDF Receipts - they'll be generated when an order has been completed
- Added Coupon Total to the totals section and the Line Items fieldtype in the Order edit screen
- You can now duplicate products
- Blueprints are now loaded from Simple Commerce instead of being published to your
resource/blueprints
folder - We now 'transform' data before sending it to tags (basically your templating experience got better)
- Fixed coupon state (hopefully!)
- Fixed some issues when using Simple Commerce in the CP as a non super user - thanks @zedix!
- Various other small things...
v1.0.0-beta.18
- Brand new install command
- You can now run Simple Commerce commands with
php please
- Added
from_price
andto_price
attributes to products - Change the way we publish our vendor stuff
- Allow for gateway classes to be strings
v1.0.0-beta.17
Rebuilt the Cart System
- A cart is now just an order under the hood, and things in a cart/order are now line items.
- And you can now setup coupons that can be used to give a percentage or fixed discount on an order or free shipping on an order.
🧹 Some spring cleaning (it's Spring after all)
- Deleted the old migrations... and created fresh ones
- Redesigned the Order 'View Screen' in the Control Panel
- Stuff entered into the Money fieldtype will be displayed as float (with the decimal spacing stuff) and now has a 'Read Only' setting
- Fixed the Order Successful email
- All helper classes have been moved to
DoubleThreeDigital\SimpleCommerce\Support
and they are now accessible via Facades. - Fixed relationship fieldtypes
- Simple Commerce now expects a boolean to be returned from the
completePurchase
method in gateways (see breaking changes) - Addresses are now entered before the Checkout (see implementation in the example templates repo)
- Field values are now processed correctly for Statamic's publish forms to understand.
- The redirect field in forms provided by the
simple-commerce:form
tag is now_redirect
. - Fixed an issue where an exception would be thrown due to
$fields
existing in ourIsACustomer
trait. - A formatted class name and the config is now passed to the gateway.
And brand new things....
- Added a weight and image field to variants
- You can now see complete, incomplete orders and orders by order status (in the CP navigation)
- Simple Commerce is now fully compatible with Laravel 7 and the latest Statamic beta
Breaking changes
- You'll probably want to refresh your database (this will mean wiping your data) and re-run your migrations.
- Instead of returning an array from a gateway's
completePurchase
method, you should now return a boolean of whether or not the purchase was successful.
v1.0.0-beta.16
- Add soft deletes to attributes
- Removed the
CustomerCreated
andCustomerUpdated
events (Laravel provides its own events for that) - Added
{{ simple-commerce:product }}
tag - Added
{{ simple-commerce:orders }}
tag - Added the order items fieldtype to Orders blueprint (fixing the order edit screen)
- Cleaned up Control Panel routing
- Finally got round to testing the Control Panel
- Easier access to product and variant attributes in templates, they can be accessed like any other variable
v1.0.0-beta.15
- Removed Stripe gateway from core, install
doublethreedigital/simple-commerce-stripe
instead - Updated some documentation
- Update some factories and tests
- Added a new
{{ simple-commerce:orders }}
tag - Added a REST API for Simple Commerce
- Removed the New Customers widget
- Removed the customer blueprint
- Updated the customer blueprint
- Add a confirmation message before deleting things
- Removed the customers section from the Control Panel
- Added a version command
php artisan simple-commerce:version
- Removed tags from fieldtypes provided by Simple Commerce
- Removed the Customer Fieldtype
- Built a new system for making Eloquent models SC customers
Breaking changes
You'll need to migrate your users store to a database and add the IsACustomer
trait to your User
model.
Make sure to delete your customers blueprint and update the 'Orders' blueprint from Simple Commerce.
If you're using the Simple Commerce new customers widget, remove it from your config/statamic/cp.php
file.
v1.0.0-beta.14
- Made the
value
field nullable on attributes table - Rebuild attributes so they can use fields (basically, they can now be defined by the developer in a fieldtype)
- Moved
dist
toresources/dist
- Renamed
stock_number
tostock
in the blueprint so it matches the database column name - Only delete attributes if they exist
Upgrade Notes
You'll need to republish & run migrations and republish blueprints and fieldsets
v1.0.0-beta.13
This beta release changes the way Simple Commerce handles the front-end of your site.
Previous to this release, Simple Commerce provided its own set of routes, controllers and views to create your store's front-end.
This release gets rid of that. The only requests to Simple Commerce controllers you'll need to make will be related to the cart or the checkout.
You can read more about the changes in this pull request.
Changelog
- Removed
routes
from config - Added a new
form
tag for Simple Commerce - Renamed the
commerce
tag tosimple-commerce
- Removed all of the front-end views - for the moment you can catch them here
- Added new action routes
- New form builder
- Loads of tests
- Removed
url
attributes from models - Updated documentation for everything
Upgrade Guide
Since there are quite a lot of changes, here's a quick upgrade guide:
Removes routes
from config
Simple Commerce no longer provides its own set of routes, so you can remove the routes
section from your simple-commerce.php
configuration file.
Removes front-end boilerplate
This release removes the front-end boilerplate/template that comes with Simple Commerce. However, if you really want to, you can see the views over here: https://github.com/doublethreedigital/simple-commerce-example
You'll now have to create your own routes, controllers and views.
Removed all web routes
Instead of relying on the routes Simple Commerce provides, you'll need to provide your own.
Renamed the Simple Commerce tag
If you were using the {{ commerce }}
tag in your templates, you'll need to change it out to {{ simple-commerce }}
Forms
Obviously, Simple Commerce still provides controllers for cart and checkout stuff. You can create those forms with the {{ simple-commerce:form }}
tag. See example:
{{ commerce:form for='checkout' redirect='/thanks' class='flex flex-col w-full' }}
<input type="text" name="name">
<input type="text" name="email">
<button>Checkout</button>
{{ /commerce:form }}
Removed url
attributes from models
As Simple Commerce no longer knows the routes for products or categories, the url
attribute has been removed from them.
Removed {{ commerce:route }}
This tag was only required for Simple Commerce routes anyway, but as we don't have any of those anymore, it can disappear.
v1.0.0-beta.12
- Fix issues around creating and updating products
v1.0.0-beta.11
- Updated blueprints
- Change blueprints path
- Fixed country and state fieldtype blanking
- Don't send notifications about stock if variant has unlimited stock
- Fix variants validation issue
- Updated the issue template
Breaking
You'll need to move your blueprints from within resources/blueprints/simple-commerce
into resources/blueprint
You might also need to republish your blueprints to get the blueprint changes