Skip to content

Commit

Permalink
Merge pull request #3666 from andrzejewsky/bugfix/3662
Browse files Browse the repository at this point in the history
Fix problem with quantity on product page
  • Loading branch information
andrzejewsky committed Oct 1, 2019
2 parents 8dbcdd5 + db6b6ba commit 99a493d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add missing parameters (`size`,`start`) to `quickSearchByQuery()` in `attribute/list` action - @cewald (#3627)
- Fix breadcrumb homepage link in cms static pages - @andrzejewsky (#3631)
- Fixed special price that can break when you change pages (browser navigation for/back) or just go from category to product page - @resubaka (#3638)
- Fixed problem with changing quantity in offline mode on product page - @andrzejewsky (#3662)
- Fixed problem with extending storeView configuration - @andrzejewsky (#3655)
- Removed infinite loop when changing checkbox in shipping details - @gibkigonzo (#3656)
- Fixed displaying single order in the profile - @andrzejewsky (#3663)
Expand Down
10 changes: 8 additions & 2 deletions src/themes/default/pages/Product.vue
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@
:name="getInputName"
v-model="getCurrentProduct.qty"
:min="quantity ? 1 : 0"
:max="quantity"
:disabled="quantity ? false : true"
:max="maxQuantity"
:disabled="quantityDisabled"
:value="quantity ? 1 : 0"
@blur="$v.$touch()"
:validations="[
Expand Down Expand Up @@ -357,6 +357,12 @@ export default {
},
isAddToCartDisabled () {
return this.$v.$invalid || this.isStockInfoLoading || (this.isOnline && (!this.quantity && this.isSimpleOrConfigurable))
},
maxQuantity () {
return this.isOnline ? this.quantity : null
},
quantityDisabled () {
return this.isOnline ? !this.quantity : false
}
},
async mounted () {
Expand Down

0 comments on commit 99a493d

Please sign in to comment.