Skip to content

Commit

Permalink
Add support for Commerce 3
Browse files Browse the repository at this point in the history
  • Loading branch information
Tam committed Mar 18, 2020
1 parent 8913855 commit d9f5ea8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.1.5 - 2020-03-18
### Changed
- Add support for Commerce 3

## 1.1.4 - 2019-12-17
### Added
- Add ability to pre-filter purchase patterns (via [@jmauzyk](https://github.com/jmauzyk))
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "ether/purchase-patterns",
"description": "Easily keep track of and show products customers bought together. Plus, sorting by individual and order sales.",
"version": "1.1.4",
"version": "1.1.5",
"type": "craft-plugin",
"license": "proprietary",
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"craftcms/cms": "^3.0.0",
"craftcms/commerce": "^2.0.0-beta.2"
"craftcms/commerce": "^2.0.0-beta.2|^3.0.0"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 2 additions & 2 deletions src/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public function getRelatedToProductCriteria (
$query = Product::find()
->id($productIds)
->limit($limit)
->fixedOrder();
->fixedOrder();

foreach ($filters as $prop => $val)
$query->$prop($val);
Expand Down Expand Up @@ -224,7 +224,7 @@ public function getRelatedToOrderCriteria (
$query = Product::find()
->id($productIds)
->limit($limit)
->fixedOrder();
->fixedOrder();

foreach ($filters as $prop => $val)
$query->$prop($val);
Expand Down
2 changes: 1 addition & 1 deletion src/templates/_product/edit.twig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
</div>
<hr>
<div class="meta">
<div class="meta" style="padding-top:20px;padding-bottom:20px">
<h4>{{ 'Purchased With'|t('purchase-patterns') }}</h4>
<ul>
{% for p in purchasedWith %}
Expand Down

0 comments on commit d9f5ea8

Please sign in to comment.