Upgrading
Rapidez v4
In this release, we migrated from ReactiveSearch to InstantSearch 🚀. To index products, we're now using Laravel Scout with Searchkit.
With this we're introducing some new features:
- Search within results filter
- Search history, your latest searches visible within the autocomplete
- Search suggestions, based on previous searches
- Select super attributes on products while filtering, so when you filter on a color this will be selected on all items so the matching images will show
Other changes included in this release:
- Config refactor
- Custom range slider, removing the vue-slider-component dependency
- Made more components customizable from Blade:
- Visual improvements
You should review all template/config changes
Composer dependencies
Check all your dependencies one by one to see if they're compatible and what has changed in changelogs / release notes. To get a nice overview, run the following command:
composer outdated
.env
changes
We switched mailerlite/laravel-elasticsearch for matchish/laravel-scout-elasticsearch. With that change, the configs have also changed. They are compatible but we recommend changing them from:
ELASTICSEARCH_HOST=localhost
ELASTICSEARCH_PORT=9200
ELASTICSEARCH_SCHEME=http
ELASTICSEARCH_USER=
ELASTICSEARCH_PASS=
To:
ELASTICSEARCH_HOST=http://localhost:9200
ELASTICSEARCH_USER=
ELASTICSEARCH_PASSWORD=
You will also have to replace ELASTICSEARCH_PREFIX
with SCOUT_PREFIX
:
- ELASTICSEARCH_PREFIX="your_prefix_here"
+ SCOUT_PREFIX="your_prefix_here"
Frontend changes
Dependencies
- Remove
yarn remove @appbaseio/reactivesearch-vue
- Install
yarn add -D @searchkit/instantsearch-client instantsearch.js vue-instantsearch
- Build
yarn build
TIP
We recommend to double check all frontend dependencies with yarn outdated
. But keep in mind that Rapidez doesn't support Vue 3 yet.
Config refactor
Store-specific values
With the config refactor comes a rework of how store-specific config values get defined. You will have to change the checkout_steps
and themes
values in frontend.php
to reflect this:
'checkout_steps' => [
- 'default' => ['login', 'credentials', 'payment'],
+ 'login', 'credentials', 'payment',
],
...
-'themes' => [
- 'default' => resource_path('themes/default'),
-],
+'theme' => resource_path('themes/default'),
Any store-specific values have been moved to store-specific config files. For example, if you had a store with store_code secondstore
with a different theme folder, you need to make a new config file under config/rapidez/stores/secondstore/frontend.php
like this:
<?php
return [
'theme' => resource_path('themes/secondstore'),
];
With this refactor, you can use this method to override any Rapidez config value with a store-specific variant. See also the documentation for this functionality.