Skip to content
This repository was archived by the owner on Jan 26, 2024. It is now read-only.

Commit 0f2ba1c

Browse files
committed
merge develop
2 parents e773d6c + 2add511 commit 0f2ba1c

File tree

6 files changed

+23
-21
lines changed

6 files changed

+23
-21
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
- Problem with placing second order (unbinding payment methods after first order) - @patzick (#2195, #2503)
1313
- Remaking order on user orders page - @patzick (#2480)
1414
- Images blinking on category page - @pkarw (#2523)
15+
- Validation in the Myprofile section for postcode field - @pkarw (#1317)
16+
- Non-integer qty of product added to the cart - @pkarw (#2517)
1517

1618
### Changed / Improved
1719
- Fixed an issue where the correct image for a product configuration wasn't set on the product page image carousel. Also added the fix on the productcarousel in the zoom component - @DaanKouters (#2419)

core/modules/cart/store/actions.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ const actions: ActionTree<CartState, RootState> = {
227227
let productIndex = 0
228228
for (let product of productsToAdd) {
229229
if (typeof product === 'undefined' || product === null) continue
230+
if (product.qty && typeof product.qty !== 'number') product.qty = parseInt(product.qty)
230231
if ((rootStore.state.config.useZeroPriceProduct)? product.priceInclTax < 0 : product.priceInclTax <= 0 ) {
231232
rootStore.dispatch('notification/spawnNotification', {
232233
type: 'error',

core/modules/cart/store/mutations.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const mutations: MutationTree<CartState> = {
1414
if (!record) {
1515
let item = {
1616
...product,
17-
qty: product.qty ? product.qty : 1
17+
qty: parseInt(product.qty ? product.qty : 1)
1818
}
1919
Vue.prototype.$bus.$emit('cart-before-add', { product: item })
2020
state.cartItems.push(item)
@@ -43,7 +43,7 @@ const mutations: MutationTree<CartState> = {
4343

4444
if (record) {
4545
Vue.prototype.$bus.$emit('cart-before-update', { product: record })
46-
record.qty = qty
46+
record.qty = parseInt(qty)
4747
Vue.prototype.$bus.$emit('cart-after-update', { product: record })
4848
state.cartSavedAt = Date.now()
4949
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
"commander": "^2.18.0",
9999
"cross-env": "^3.1.4",
100100
"css-loader": "^1.0.0",
101-
"cypress": "^3.0.2",
101+
"cypress": "^3.1.5",
102102
"d3-dsv": "^1.0.8",
103103
"detect-installed": "^2.0.4",
104104
"empty-dir": "^1.0.0",

src/themes/default/components/core/blocks/MyAccount/MyProfile.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ export default {
429429
},
430430
postcode: {
431431
required,
432-
minLength: minLength(5)
432+
minLength: minLength(3)
433433
},
434434
city: {
435435
required

yarn.lock

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -903,9 +903,10 @@
903903
"@types/express-serve-static-core" "*"
904904
"@types/mime" "*"
905905

906-
907-
version "2.7.29"
908-
resolved "https://registry.yarnpkg.com/@types/sinon-chai/-/sinon-chai-2.7.29.tgz#4db01497e2dd1908b2bd30d1782f456353f5f723"
906+
907+
version "3.2.2"
908+
resolved "https://registry.yarnpkg.com/@types/sinon-chai/-/sinon-chai-3.2.2.tgz#5cfdbda70bae30f79a9423334af9e490e4cce793"
909+
integrity sha512-5zSs2AslzyPZdOsbm2NRtuSNAI2aTWzNKOHa/GRecKo7a5efYD7qGcPxMZXQDayVXT2Vnd5waXxBvV31eCZqiA==
909910
dependencies:
910911
"@types/chai" "*"
911912
"@types/sinon" "*"
@@ -914,9 +915,10 @@
914915
version "5.0.7"
915916
resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-5.0.7.tgz#0d9f89dd0c9988c4f1505a92a3a324ee7bdb18a6"
916917

917-
918-
version "4.0.0"
919-
resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-4.0.0.tgz#9a93ffa4ee1329e85166278a5ed99f81dc4c8362"
918+
919+
version "7.0.0"
920+
resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-7.0.0.tgz#84e707e157ec17d3e4c2a137f41fc3f416c0551e"
921+
integrity sha512-kcYoPw0uKioFVC/oOqafk2yizSceIQXCYnkYts9vJIwQklFRsMubTObTDrjQamUyBRd47332s85074cd/hCwxg==
920922

921923
"@types/sizzle@*":
922924
version "2.3.2"
@@ -3600,9 +3602,10 @@ cyclist@~0.2.2:
36003602
version "0.2.2"
36013603
resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-0.2.2.tgz#1b33792e11e914a2fd6d6ed6447464444e5fa640"
36023604

3603-
cypress@^3.0.2:
3604-
version "3.1.3"
3605-
resolved "https://registry.yarnpkg.com/cypress/-/cypress-3.1.3.tgz#f6253e2428c9f76e0541440b959b6282d1757467"
3605+
cypress@^3.1.5:
3606+
version "3.1.5"
3607+
resolved "https://registry.yarnpkg.com/cypress/-/cypress-3.1.5.tgz#5227b2ce9306c47236d29e703bad9055d7218042"
3608+
integrity sha512-jzYGKJqU1CHoNocPndinf/vbG28SeU+hg+4qhousT/HDBMJxYgjecXOmSgBX/ga9/TakhqSrIrSP2r6gW/OLtg==
36063609
dependencies:
36073610
"@cypress/listr-verbose-renderer" "0.4.1"
36083611
"@cypress/xvfb" "1.2.3"
@@ -3614,8 +3617,8 @@ cypress@^3.0.2:
36143617
"@types/lodash" "4.14.87"
36153618
"@types/minimatch" "3.0.3"
36163619
"@types/mocha" "2.2.44"
3617-
"@types/sinon" "4.0.0"
3618-
"@types/sinon-chai" "2.7.29"
3620+
"@types/sinon" "7.0.0"
3621+
"@types/sinon-chai" "3.2.2"
36193622
bluebird "3.5.0"
36203623
cachedir "1.3.0"
36213624
chalk "2.4.1"
@@ -3633,7 +3636,7 @@ cypress@^3.0.2:
36333636
is-installed-globally "0.1.0"
36343637
lazy-ass "1.6.0"
36353638
listr "0.12.0"
3636-
lodash "4.17.10"
3639+
lodash "4.17.11"
36373640
log-symbols "2.2.0"
36383641
minimist "1.2.0"
36393642
moment "2.22.2"
@@ -6727,11 +6730,7 @@ lodash.uniq@^4.5.0:
67276730
version "4.5.0"
67286731
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
67296732

6730-
6731-
version "4.17.10"
6732-
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7"
6733-
6734-
lodash@^4.0.0, lodash@^4.0.1, lodash@^4.14.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0, lodash@^4.5.0, lodash@^4.9.0, lodash@~4.17.10:
6733+
[email protected], lodash@^4.0.0, lodash@^4.0.1, lodash@^4.14.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0, lodash@^4.5.0, lodash@^4.9.0, lodash@~4.17.10:
67356734
version "4.17.11"
67366735
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d"
67376736

0 commit comments

Comments
 (0)