Skip to content

Commit da0a152

Browse files
committed
Merge branch 'master' into flat-tables-customer-pricing
2 parents bbe29ab + c96b396 commit da0a152

File tree

138 files changed

+1218
-861
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+1218
-861
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
- Branch: Target the right branch and create another pull request if it's needed in multiple branches.
55
- Docs: Should it be documented? Create a pull requests to rapidez/docs. Breaking? Write some upgrade info.
66
- Tests: Don't forget the tests; they should pass and adding more is always a good idea.
7+
- Reference: Is there any reference? Maybe an internal Jira story number?
78
89
Thanks! 🚀
910
-->

.github/workflows/playwright.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ jobs:
2727
fail-fast: false
2828
matrix:
2929
include:
30-
- magento-version: 2.4.7-p7
30+
- magento-version: 2.4.7-p8
3131
magento-php-version: php83-fpm
3232
rapidez-php-version: 8.3
33-
- magento-version: 2.4.8-p2
33+
- magento-version: 2.4.8-p3
3434
magento-php-version: php84-fpm
3535
rapidez-php-version: 8.4
3636
screenshots: true
@@ -110,6 +110,9 @@ jobs:
110110
- name: Install Rapidez command
111111
run: php artisan rapidez:install --frontendonly
112112

113+
- name: Publish payment icons
114+
run: php artisan vendor:publish --tag=payment-icons
115+
113116
- name: Install Yarn dependencies
114117
run: npm install -g yarn && yarn
115118

CHANGELOG.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,37 @@
11
# Changelog
22

3-
[Unreleased changes](https://github.com/rapidez/core/compare/4.7.6...4.7.6)
3+
[Unreleased changes](https://github.com/rapidez/core/compare/5.0.0-alpha.2...5.0.0-alpha.2)
4+
## [5.0.0-alpha.2](https://github.com/rapidez/core/releases/tag/5.0.0-alpha.2) - 2025-11-14
5+
6+
### Changed
7+
8+
- Vue 3 upgrade (#951)
9+
10+
## [4.8.0](https://github.com/rapidez/core/releases/tag/4.8.0) - 2025-10-14
11+
12+
### Added
13+
14+
- Playwright attach Lighthouse report (#1036)
15+
- Loader button option (#969)
16+
- Cart quantity debounce (#1046)
17+
- Range slider labels option and clip fix (#1037)
18+
19+
### Changed
20+
21+
- Only show 1 product in sliders on mobile (#1030)
22+
- Also update the cart on error (#1047)
23+
24+
### Fixed
25+
26+
- Category positions fix (#1029)
27+
- Check email availability if it's prefilled (#1033)
28+
- Prevent layout shift listing product names (#1031)
29+
- Crash when custom size has been passed fix (#1032)
30+
- Missing brackets fix (#1041)
31+
- Disable setting guest email when guest checkout is disabled (#1040)
32+
- Playwright publish payment icons (#1045)
33+
- Unknown turbo-frame error fix (#1048)
34+
435
## [4.7.6](https://github.com/rapidez/core/releases/tag/4.7.6) - 2025-10-02
536

637
### Fixed

config/rapidez/magento-defaults.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
'cataloginventory/item_options/qty_increments' => '1',
1616
'cataloginventory/options/show_out_of_stock' => '0',
1717
'checkout/cart/redirect_to_cart' => '0',
18+
'checkout/options/guest_checkout' => '1',
1819
'currency/options/default' => 'USD',
1920
'customer/address/company_show' => 'opt',
2021
'customer/address/fax_show' => '',
@@ -27,6 +28,8 @@
2728
'customer/address/taxvat_show' => '',
2829
'customer/address/telephone_show' => 'req',
2930
'customer/create_account/vat_frontend_visibility' => '0',
31+
'customer/password/minimum_password_length' => '8',
32+
'customer/password/required_character_classes_number' => '3',
3033
'design/search_engine_robots/default_robots' => 'INDEX,FOLLOW',
3134
'general/country/default' => 'US',
3235
'general/locale/code' => 'en_US',
@@ -41,6 +44,4 @@
4144
'trans_email/ident_general/email' => '[email protected]',
4245
'web/secure/base_url' => '{{unsecure_base_url}}',
4346
'web/url/catalog_media_url_format' => 'hash',
44-
'customer/password/required_character_classes_number' => '3',
45-
'customer/password/minimum_password_length' => '8',
4647
];

lang/nl.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
"We care about the protection of your data. Read our": "Wij geven om de bescherming van uw gegevens. Lees onze",
119119
"We found other products you might like!": "We hebben andere producten gevonden die je misschien leuk vindt!",
120120
"We will get to work for you right away": "Wij gaan meteen aan de slag",
121-
"We will send a confirmation of your order to": "Wij zullen een confirmatie sturen naar",
121+
"We will send a confirmation of your order to": "Wij zullen een bevestiging sturen naar",
122122
"What are you looking for?": "Waar ben je naar op zoek?",
123123
"Wishlist": "Wensenlijst",
124124
"Yes": "Ja",

lang/nl/frontend.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,4 @@
4444
'desc' => 'Naam Z-A',
4545
],
4646
],
47-
48-
'search' => [
49-
'title' => 'Zoeken naar',
50-
],
5147
];

package.json

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@
1717
"@tailwindcss/forms": "^0.5.3",
1818
"@tailwindcss/typography": "^0.5.9",
1919
"@types/node": "^24.0.1",
20-
"@vitejs/plugin-vue2": "^2.2.0",
21-
"@vueuse/core": "^11.1.0",
22-
"@vueuse/integrations": "^10.11.0",
20+
"@vitejs/plugin-vue": "^6.0.1",
21+
"@vueuse/core": "^13.6.0",
22+
"@vueuse/integrations": "^13.6.0",
2323
"autoprefixer": "^10.4.15",
24-
"cross-env": "^7.0.3",
24+
"cross-env": "^10.0.0",
2525
"dotenv": "^17.2.0",
2626
"graphql": "^16.8.1",
2727
"graphql-combine-query": "indykoning/graphql-combine-query#feature/add-allowed-duplicates",
2828
"graphql-tag": "^2.12.6",
29-
"instantsearch.js": "^4.75.7",
30-
"laravel-vite-plugin": "^1.0.5",
29+
"instantsearch.js": "^4.79.2",
30+
"laravel-vite-plugin": "^2.0.0",
3131
"lighthouse": "^12.8.2",
3232
"playwright-lighthouse": "^4.0.0",
3333
"postcss": "^8.4.29",
@@ -38,14 +38,12 @@
3838
"tailwind-scrollbar-hide": "^1.1.7",
3939
"tailwindcss": "^3.4",
4040
"universal-cookie": "^7.1.4",
41-
"vite": "^5.0",
42-
"vue": "^2.7",
43-
"vue-clickaway": "^2.2.2",
41+
"vite": "^7.0",
42+
"vue": "^3.5",
43+
"vue3-click-away": "^1.2.4",
4444
"vue-cookies": "^1.8.2",
4545
"vue-instantsearch": "^4.19.13",
46-
"vue-template-compiler": "^2.7.14",
47-
"vue-turbolinks": "^2.2.2",
48-
"vue2-teleport": "^1.1.4"
46+
"vue-turbolinks": "^2.2.2"
4947
},
5048
"dependencies": {},
5149
"workspaces": [

resources/js/callbacks.js

Lines changed: 85 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,110 +1,112 @@
1+
import { useEventListener } from '@vueuse/core'
12
import { cart, clear as clearCart } from './stores/useCart'
23
import { fillFromGraphqlResponse as updateOrder } from './stores/useOrder'
34
import { runAfterPlaceOrderHandlers, runBeforePaymentMethodHandlers, runBeforePlaceOrderHandlers } from './stores/usePaymentHandlers'
45
import { refresh as refreshUser, token } from './stores/useUser'
56

6-
Vue.prototype.scrollToElement = (selector, offset = 0) => {
7-
let el = window.document.querySelector(selector)
8-
if (el) {
9-
window.scrollTo({
10-
top: el.offsetTop - offset,
11-
behavior: 'smooth',
12-
})
13-
}
14-
}
15-
16-
Vue.prototype.getCheckoutStep = (stepName) => {
17-
return config.checkout_steps?.indexOf(stepName)
18-
}
19-
20-
Vue.prototype.submitPartials = async function (form, sequential = false) {
21-
let promises = []
22-
for (const element of form.querySelectorAll('[partial-submit]')) {
23-
const partialFn = element?.getAttribute('partial-submit')
24-
if (!partialFn || !element?.__vue__) {
25-
continue
7+
document.addEventListener('vue:loaded', function (event) {
8+
const vue = event.detail.vue
9+
vue.config.globalProperties.scrollToElement = (selector, offset = 0) => {
10+
let el = window.document.querySelector(selector)
11+
if (el) {
12+
window.scrollTo({
13+
top: el.offsetTop - offset,
14+
behavior: 'smooth',
15+
})
2616
}
17+
}
2718

28-
const createdPromise = element.__vue__[partialFn]().then((result) => {
29-
if (result === false) {
30-
throw new Error()
19+
vue.config.globalProperties.getCheckoutStep = (stepName) => {
20+
return config.checkout_steps?.indexOf(stepName)
21+
}
22+
23+
vue.config.globalProperties.submitPartials = async function (form, sequential = false) {
24+
let promises = []
25+
for (const element of form.querySelectorAll('[partial-submit]')) {
26+
if (!element.__vnode.props.onPartialSubmit) {
27+
continue
3128
}
32-
})
3329

34-
if (sequential) {
35-
await createdPromise
30+
const createdPromise = element.__vnode.props.onPartialSubmit().then((result) => {
31+
if (result === false) {
32+
throw new Error()
33+
}
34+
})
35+
36+
if (sequential) {
37+
await createdPromise
38+
}
39+
40+
promises.push(createdPromise)
3641
}
3742

38-
promises.push(createdPromise)
43+
return await Promise.all(promises)
3944
}
4045

41-
return await Promise.all(promises)
42-
}
43-
44-
Vue.prototype.checkResponseForExpiredCart = async function (variables, response) {
45-
if (
46-
response?.errors?.some(
47-
(error) =>
48-
error.extensions?.category === 'graphql-no-such-entity' &&
49-
// Untested, but something like this is maybe a better idea as
50-
// we're using a lot of different mutations in the checkout.
51-
error.path.some((path) => path.toLowerCase().includes('cart')),
52-
)
53-
) {
54-
Notify(window.config.translations.errors.cart_expired, 'error')
55-
clearCart()
56-
if (token.value !== undefined) {
57-
// If the cart has expired, check if the session is not expired
58-
refreshUser()
46+
vue.config.globalProperties.checkResponseForExpiredCart = async function (variables, response) {
47+
if (
48+
response?.errors?.some(
49+
(error) =>
50+
error.extensions?.category === 'graphql-no-such-entity' &&
51+
// Untested, but something like this is maybe a better idea as
52+
// we're using a lot of different mutations in the checkout.
53+
error.path.some((path) => path.toLowerCase().includes('cart')),
54+
)
55+
) {
56+
Notify(window.config.translations.errors.cart_expired, 'error')
57+
clearCart()
58+
if (token.value !== undefined) {
59+
// If the cart has expired, check if the session is not expired
60+
refreshUser()
61+
}
62+
63+
return true
5964
}
6065

61-
return true
66+
await vue.config.globalProperties.updateCart(variables, response)
67+
68+
return false
6269
}
6370

64-
return false
65-
}
71+
vue.config.globalProperties.updateCart = async function (data, response) {
72+
if (!response?.data) {
73+
return response?.data
74+
}
75+
cart.value =
76+
Object.values(response.data)
77+
.map((queryResponse) => (queryResponse && 'cart' in queryResponse ? queryResponse.cart : queryResponse))
78+
.findLast((queryResponse) => queryResponse?.is_virtual !== undefined) ?? cart.value
6679

67-
Vue.prototype.updateCart = async function (data, response) {
68-
if (!response?.data) {
69-
return response?.data
80+
window.$emit('cart-updated', {
81+
cart: cart,
82+
})
83+
84+
return response.data
7085
}
71-
cart.value = Object.values(response.data)
72-
.map((queryResponse) => ('cart' in queryResponse ? queryResponse.cart : queryResponse))
73-
.findLast((queryResponse) => queryResponse?.is_virtual !== undefined)
7486

75-
document.dispatchEvent(
76-
new CustomEvent('cart-updated', {
77-
detail: {
78-
cart: cart,
79-
},
80-
}),
81-
)
87+
vue.config.globalProperties.updateOrder = async function (data, response) {
88+
await updateOrder(data, response)
8289

83-
return response.data
84-
}
90+
return response.data
91+
}
8592

86-
Vue.prototype.updateOrder = async function (data, response) {
87-
await updateOrder(data, response)
93+
vue.config.globalProperties.handleBeforePaymentMethodHandlers = runBeforePaymentMethodHandlers
94+
vue.config.globalProperties.handleBeforePlaceOrderHandlers = runBeforePlaceOrderHandlers
8895

89-
return response.data
90-
}
96+
vue.config.globalProperties.handlePlaceOrder = async function (data, response) {
97+
if (!response?.data) {
98+
return response?.data
99+
}
91100

92-
Vue.prototype.handleBeforePaymentMethodHandlers = runBeforePaymentMethodHandlers
93-
Vue.prototype.handleBeforePlaceOrderHandlers = runBeforePlaceOrderHandlers
101+
if (!response?.data?.placeOrder?.orderV2 && response?.data?.placeOrder?.errors) {
102+
const message = response.data.placeOrder.errors.find(() => true).message
103+
Notify(message, 'error')
104+
throw new Error(message)
105+
}
94106

95-
Vue.prototype.handlePlaceOrder = async function (data, response) {
96-
if (!response?.data) {
97-
return response?.data
98-
}
107+
await updateOrder(data, response)
108+
await runAfterPlaceOrderHandlers(response, this)
99109

100-
if (!response?.data?.placeOrder?.orderV2 && response?.data?.placeOrder?.errors) {
101-
const message = response.data.placeOrder.errors.find(() => true).message
102-
Notify(message, 'error')
103-
throw new Error(message)
110+
return response.data
104111
}
105-
106-
await updateOrder(data, response)
107-
await runAfterPlaceOrderHandlers(response, this)
108-
109-
return response.data
110-
}
112+
})

resources/js/components/Checkout/CheckoutLogin.vue

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ export default {
1818
type: Boolean,
1919
default: false,
2020
},
21+
allowGuest: {
22+
type: Boolean,
23+
default: true,
24+
},
2125
},
2226
2327
data: () => ({
@@ -31,7 +35,13 @@ export default {
3135
}),
3236
3337
render() {
34-
return this.$scopedSlots.default(this)
38+
return this.$slots.default(this)
39+
},
40+
41+
mounted() {
42+
if (!user.value.is_logged_in && this.email) {
43+
this.checkEmailAvailability()
44+
}
3545
},
3646
3747
methods: {
@@ -85,6 +95,10 @@ export default {
8595
},
8696
8797
async handleGuest() {
98+
if (!this.allowGuest) {
99+
return false
100+
}
101+
88102
await setGuestEmailOnCart(this.email)
89103
90104
return true

0 commit comments

Comments
 (0)