Skip to content

Commit

Permalink
Merge branch 'release/4.5.1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
nfourtythree committed Mar 1, 2024
2 parents e34e36a + 7f59776 commit 504896a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Release Notes for Craft Commerce

## 4.5.1.1 - 2024-03-01

- Fixed a bug where the “Share cart” order index action wasn’t working.
- Fixed a bug where editing an adjustment’s amount could cause the adjustment to lose data on the Edit Order page. ([#3392](https://github.com/craftcms/commerce/issues/3392))

## 4.5.1 - 2024-02-29

- Fixed a SQL error that could occur when updating to Commerce 4 on MySQL. ([#3388](https://github.com/craftcms/commerce/pull/3388))
Expand Down
2 changes: 1 addition & 1 deletion src/elements/traits/OrderElementTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function getFieldLayout(): FieldLayout
protected function htmlAttributes(string $context): array
{
$attributes = parent::htmlAttributes($context);
$attributes['data-number'] = $this->number;
$attributes['data'] = ['number' => $this->number];
return $attributes;
}

Expand Down
2 changes: 1 addition & 1 deletion src/web/assets/commerceui/dist/js/app.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/web/assets/commerceui/dist/js/app.js.map

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
},
],
allowedAdjustmentTypes: ['tax', 'discount', 'shipping'],
localAdjustment: this.adjustment,
localAdjustmentAmount: this.adjustment.amount,
amountNaN: false,
};
},
Expand Down Expand Up @@ -272,14 +272,13 @@
amount: {
get() {
return this.localAdjustment.amount;
return this.localAdjustmentAmount;
},
set: debounce(function (value) {
this.localAdjustment.amount = value;
this.localAdjustmentAmount = value;
if (value === '' || isNaN(value)) {
console.log("isn't a number", value);
if (value === '') {
this.amountNaN = false;
} else {
Expand All @@ -289,7 +288,9 @@
}
this.amountNaN = false;
this.$emit('update', this.localAdjustment);
let adjustment = this.adjustment;
adjustment.amount = this.localAdjustmentAmount;
this.$emit('update', adjustment);
}, 1000),
},
Expand Down

0 comments on commit 504896a

Please sign in to comment.