Skip to content

Commit

Permalink
Fixed #11
Browse files Browse the repository at this point in the history
  • Loading branch information
andris-sevcenko committed Oct 8, 2018
1 parent 495cd77 commit 0251fe6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Changelog
### Fixed
- Fixed a bug where only fields in the first layout tab were visible when editing a product. ([#8](https://github.com/craftcms/commerce-digital-products/issues/8))
- Fixed a bug where product element slugs would not work. ([#9](https://github.com/craftcms/commerce-digital-products/issues/9))
- Fixed a bug where querying for licenses would not work in some cases. ([#11](https://github.com/craftcms/commerce-digital-products/issues/11))

### Added
- Added `craft\digitalproducts\models\ProductTypeSite::getSite()`
Expand Down
4 changes: 2 additions & 2 deletions src/elements/db/LicenseQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ protected function beforePrepare(): bool
}

if ($this->productId) {
$this->subQuery->andWhere(Db::parseDateParam('digitalproducts_products.productId', $this->productId));
$this->subQuery->andWhere(Db::parseParam('digitalproducts_products.productId', $this->productId));
}

if ($this->typeId) {
Expand All @@ -411,7 +411,7 @@ protected function beforePrepare(): bool
}

if ($this->orderId) {
$this->subQuery->andWhere(Db::parseParam('digitalproducts_products.orderId', $this->orderId));
$this->subQuery->andWhere(Db::parseParam('digitalproducts_licenses.orderId', $this->orderId));
}

if ($this->licenseKey) {
Expand Down

0 comments on commit 0251fe6

Please sign in to comment.