Skip to content

Commit

Permalink
Fix prefixed tables on join queries
Browse files Browse the repository at this point in the history
  • Loading branch information
bymayo committed Oct 15, 2018
1 parent da6a483 commit 14acd7e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Commerce Widgets Changelog

## 2.0.7 - 2018-10-15
### Fixed
- Fix prefixed tables on join queries [#9](https://github.com/bymayo/craft-commerce-widgets/issues/9)

## 2.0.6 - 2018-10-14
### Fixed
- Fix prefixed tables [#9](https://github.com/bymayo/craft-commerce-widgets/issues/9)
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": "bymayo/commerce-widgets",
"description": "Insightful dashboard widgets for your Craft Commerce 2 store.",
"type": "craft-plugin",
"version": "2.0.6",
"version": "2.0.7",
"keywords": [
"craft",
"cms",
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/SubscriptionPlans.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function getSubscriptionPlans()
]
)
->join(
'LEFT JOIN', 'commerce_subscriptions subscriptions', 'subscriptions.planId = plans.id'
'LEFT JOIN', '{{%commerce_subscriptions}} subscriptions', 'subscriptions.planId = plans.id'
)
->where(
[
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/TopCustomers.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function getCustomers()
if($this->includeGuests == 'no')
{
$query
->join('INNER JOIN', 'commerce_customers customers', 'orders.customerId = customers.id')
->join('INNER JOIN', '{{%commerce_customers}} customers', 'orders.customerId = customers.id')
->andWhere(['not', ['customers.userId' => null]]);
}

Expand Down

0 comments on commit 14acd7e

Please sign in to comment.