Skip to content

Commit

Permalink
Bug fixes and 1.1.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
mediabeastnz committed Jun 9, 2019
1 parent c26ca57 commit b597410
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Release Notes for Back In Stock

## 1.1.0 - 2019-06-09
### Added
- Ability to store additional options e.g. product attributes etc (Thanks Josh Crawford)
- Responses are now ajax friendly
- Added response message for when email is already detected
### Fixed
- Validation issues when no email was entered and other various responses
- Creating a new product would cause an error as no variant was found, this is now fixed

## 1.0.1 - 2019-05-30
### Changed
- Minor update to plugin icon
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "mediabeastnz/craft-commerce-back-in-stock",
"description": "Back in stock plugin for Craft Commerce 2 that notifies subscribed users via an automated email",
"type": "craft-plugin",
"version": "1.0.1",
"version": "1.1.0",
"keywords": [
"craft",
"cms",
Expand Down
4 changes: 0 additions & 4 deletions src/BackInStock.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ class BackInStock extends Plugin
// Public Properties
// =========================================================================

/**
* @var string
*/
public $schemaVersion = '0.1.1';

// Public Methods
// =========================================================================
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/BaseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public function actionRegisterInterest()
$model->options = $options;

if (!BackInStock::$plugin->backInStockService->createBackInStockRecord($model)) {
$error = Craft::t('craft-commerce-back-in-stock', 'We couldn\'t save your request');
$error = Craft::t('craft-commerce-back-in-stock', 'Your email is already subscribed to receive updates for this product');

if ($request->getAcceptsJson()) {
return $this->asJson([
Expand Down
2 changes: 1 addition & 1 deletion src/services/BackInStockService.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function findVariantsInStock($variant)
}
} else {
// no variants - just check the product (which is still a variant...)
$variantsToCheck[] = $v->id;
$variantsToCheck[] = $variant->productId;
}

// find any variants that had 0 stock but now have more
Expand Down

0 comments on commit b597410

Please sign in to comment.