diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ec56c2..01a08b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Commerce Widgets Changelog +## 2.0.10 - 2019-01-04 +### Fixed +- `groupBy` issue with MySQL 5.7 on some widgets +- Week was showing incorrectly in the Goal widget +- Installing the plugin now populates the cache setting by default + +### Changed +- When no elements exist on a widget they now show a message + ## 2.0.9 - 2018-10-30 ### Added - *New Widget* Top Products Widget - See your top products ordered by Revenue or # Ordered diff --git a/composer.json b/composer.json index 0e21b36..c8353d8 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "bymayo/commerce-widgets", "description": "Insightful dashboard widgets for your Craft Commerce 2 store.", "type": "craft-plugin", - "version": "2.0.9", + "version": "2.0.10", "keywords": [ "craft", "cms", diff --git a/releases.json b/releases.json index 12753e4..898e926 100644 --- a/releases.json +++ b/releases.json @@ -1,78 +1,62 @@ [ -{ - "version": "1.0.8", - "downloadUrl": "https://github.com/bymayo/commerce-widgets/archive/craft-2.zip", - "date": "2018-10-30T13:25:28.418Z", - "notes": [ - "[Fixed] Completed carts figure incorrect - https://github.com/bymayo/craft-commerce-widgets/issues/11" - ] -} - { - "version": "1.0.7", - "downloadUrl": "https://github.com/bymayo/commerce-widgets/archive/craft-2.zip", - "date": "2018-05-25T13:25:28.418Z", - "notes": [ - "[Improved] Updated Icons & Branding" - ] - }, - { - "version": "1.0.6", - "downloadUrl": "https://github.com/bymayo/commerce-widgets/archive/craft-2.zip", - "date": "2018-03-08T17:03:00+00:00", - "notes": [ - "[Added] Added 'All' to TotalRevenueOrdersWidget", - "[Improved] Moved Craft 2 version to seperate branch (Craft 3 version coming soon...)" - ] - }, - { - "version": "1.0.5", - "downloadUrl": "https://github.com/bymayo/commerce-widgets/archive/master.zip", - "date": "2017-02-09T17:03:00+00:00", - "notes": [ - "[Fixed] Incorrect limit on Cart Abadonment widget (Thanks terryupton! [Again!])", - "[Improved] Removed left over debugging in JS", - "[Improved] Changed colour of Cart Abanadoment widget chart" - ] - }, - { - "version": "1.0.4", - "downloadUrl": "https://github.com/bymayo/commerce-widgets/archive/master.zip", - "date": "2017-02-09T17:03:00+00:00", - "notes": [ - "[Fixed] Incorrect year on Total Revenue widget (Thanks terryupton!)" - ] - }, - { - "version": "1.0.3", - "downloadUrl": "https://github.com/bymayo/commerce-widgets/archive/master.zip", - "date": "2016-09-19T17:03:00+00:00", - "notes": [ - "[Added] Top Customers widget" - ] - }, - { - "version": "1.0.2", - "downloadUrl": "https://github.com/bymayo/commerce-widgets/archive/master.zip", - "date": "2016-09-19T11:57:00+00:00", - "notes": [ - "[Improved] Cart Abanadonment widget graph now has a 'No Results' state" - ] - }, - { - "version": "1.0.1", - "downloadUrl": "https://github.com/bymayo/commerce-widgets/archive/master.zip", - "date": "2016-09-19T11:42:00+00:00", - "notes": [ - "[Fixed] Fixed Cart Abandonment widget numbers", - "[Improved] Cart Abandonment widget colours. Now easier to see which value is completed" - ] - }, - { - "version": "1.0.0", - "downloadUrl": "https://github.com/bymayo/commerce-widgets/archive/master.zip", - "date": "2016-09-02T19:42:00+00:00", - "notes": [ - "[Added] Initial release" - ] - } + { + "version": "1.0.6", + "downloadUrl": "https://github.com/bymayo/commerce-widgets/archive/craft-2.zip", + "date": "2018-03-08T17:03:00+00:00", + "notes": [ + "[Added] Added 'All' to TotalRevenueOrdersWidget", + "[Improved] Moved Craft 2 version to seperate branch (Craft 3 version coming soon...)" + ] + }, + { + "version": "1.0.5", + "downloadUrl": "https://github.com/bymayo/commerce-widgets/archive/master.zip", + "date": "2017-02-09T17:03:00+00:00", + "notes": [ + "[Fixed] Incorrect limit on Cart Abadonment widget (Thanks terryupton! [Again!])", + "[Improved] Removed left over debugging in JS", + "[Improved] Changed colour of Cart Abanadoment widget chart" + ] + }, + { + "version": "1.0.4", + "downloadUrl": "https://github.com/bymayo/commerce-widgets/archive/master.zip", + "date": "2017-02-09T17:03:00+00:00", + "notes": [ + "[Fixed] Incorrect year on Total Revenue widget (Thanks terryupton!)" + ] + }, + { + "version": "1.0.3", + "downloadUrl": "https://github.com/bymayo/commerce-widgets/archive/master.zip", + "date": "2016-09-19T17:03:00+00:00", + "notes": [ + "[Added] Top Customers widget" + ] + }, + { + "version": "1.0.2", + "downloadUrl": "https://github.com/bymayo/commerce-widgets/archive/master.zip", + "date": "2016-09-19T11:57:00+00:00", + "notes": [ + "[Improved] Cart Abanadonment widget graph now has a 'No Results' state" + ] + }, + { + "version": "1.0.1", + "downloadUrl": "https://github.com/bymayo/commerce-widgets/archive/master.zip", + "date": "2016-09-19T11:42:00+00:00", + "notes": [ + "[Fixed] Fixed Cart Abandonment widget numbers", + "[Improved] Cart Abandonment widget colours. Now easier to see which value is completed" + ] + }, + { + "version": "1.0.0", + "downloadUrl": "https://github.com/bymayo/commerce-widgets/archive/master.zip", + "date": "2016-09-02T19:42:00+00:00", + "notes": [ + "[Added] Initial release" + ] + } ] diff --git a/src/models/Settings.php b/src/models/Settings.php index d6d35ec..392ceca 100755 --- a/src/models/Settings.php +++ b/src/models/Settings.php @@ -28,7 +28,7 @@ class Settings extends Model /** * @var string */ - public $cacheDuration; + public $cacheDuration = 3600; // Public Methods // ========================================================================= @@ -39,8 +39,7 @@ class Settings extends Model public function rules() { return [ - ['cacheDuration', 'integer'], - ['cacheDuration', 'default', 'value' => 3600] + ['cacheDuration', 'integer'] ]; } } diff --git a/src/templates/widgets/ProductsRecent/body.twig b/src/templates/widgets/ProductsRecent/body.twig index 6ae3e9a..5ef3c29 100755 --- a/src/templates/widgets/ProductsRecent/body.twig +++ b/src/templates/widgets/ProductsRecent/body.twig @@ -30,6 +30,12 @@