This is the repository for the plugin_filternavigation plugin. This plugin enhances the app_storefront_base cartridge by keeping track of search navigation through asynchronous actions, including the following capabilities:
- Moving back and forth between filter changes
- Go back to the PLP from a PDP without losing your location
The plugin_filternavigation plugin requires the app_storefront_base cartridge. In your cartridge path, include the cartridges in the following order:
plugin_filternavigation:app_storefront_base
- Clone this repository. (The name of the top-level folder is plugin_filternavigation.)
- In the top-level plugin_filternavigation folder, enter the following command:
npm install
. (This command installs all of the package dependencies required for this plugin.) - In the top-level plugin_filternavigation folder, edit the paths.base property in the package.json file. This property should contain a relative path to the local directory containing the Storefront Reference Architecture repository. For example:
"paths": {
"base": "../storefront-reference-architecture/cartridges/app_storefront_base/"
}
- In the top-level plugin_filternavigation folder, enter the following command:
npm run compile:js && npm run compile:scss
- In the top-level plugin_filternavigation folder, enter the following command:
npm run uploadCartridge
For information on Getting Started with SFRA, see Get Started with SFRA.
Use the provided NPM scripts to compile and upload changes to your sandbox.
npm run compile:js
- Compiles all js files and aggregates them.
Note: The plugin cartridge must be compiled after compiling storefront-reference-architecture (SFRA base) cartridge.
npm run lint
- Execute linting for all JavaScript and SCSS files in the project.
npm run watch
- Watches everything and recompiles (if necessary) and uploads to the sandbox. Requires a valid dw.json file at the root that is configured for the sandbox to upload.