Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
tobias-kuendig committed Aug 23, 2024
2 parents 1f4a838 + ce75c3b commit bc5d23b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions components/product/addtocart.htm
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
<input type="number"
id="quantity"
class="mall-input"
min="{{ item.quantity_min }}" max="{{ item.quantity_max }}"
name="quantity" value="{{ item.quantity_default | default(1) }}">
min="{{ item.quantity_min | default(1) }}"
max="{{ item.quantity_max }}"
name="quantity"
value="{{ item.quantity_default | default(1) }}">
<div data-validate-for="quantity"></div>
</div>
<button type="submit" class="mall-add-to-cart-button" data-attach-loading>
Expand Down
2 changes: 1 addition & 1 deletion models/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ public function __construct(array $attributes = [])
});

$this->bindEvent('model.relation.detach', function ($relationName, $detachedIdList) {
if ($relationName === 'categories') {
if ($relationName === 'categories' && is_array($detachedIdList)) {
foreach ($detachedIdList as $detachedId) {
$category = Category::find($detachedId);
UniquePropertyValue::updateUsingCategory($category);
Expand Down
2 changes: 2 additions & 0 deletions updates/version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -598,3 +598,5 @@ v3.4.5:
- 'Fixed Stripe errors not showing up in the checkout form'
v3.4.6:
- 'Fixed demo seeder compatibility with all RainLab.User versions'
v3.4.7:
- 'The quantity selector cannot go below 1 now by default'

0 comments on commit bc5d23b

Please sign in to comment.