Loki_Base
PHP
8.1 - 8.4
Magento
2.4.7 | 2.4.8
CSP
Yes
Integration Tests
3
Latest Release
1.1.6
Loki Base
This Magento 2 module forms the base of various other Loki solutions: Loki Checkout, Loki Admin Components, Loki Theme for Luma. It adds Alpine.js to the page, adds container-blocks for other scripts to be added, it adds its own frontend messaging component and its adds an Alpine store for both localStorage and messaging.
Most likely you do not install this module on its own, but require it through other modules.
Installation
composer require loki/magento2-base
bin/magento module:enable Loki_Base
Support
For getting support, create an Issue under the following project URL:
https://github.com/LokiExtensions/Loki_Base
Configuration Options
The following options of this module can be configured via the Store Configuration:
Messages > Timeout
loki_base/messages/timeout
Whenever messages are popping up, they are automatically after this timeout. This is by default 5000ms (5 seconds).
Module Dependencies
The following dependencies are declared in the module its `etc/module.xml` file:
Loki_CssUtils
Magento_Backend
Magento_Directory
Magento_Store
Magento_Theme
Composer details
Magento module name
Loki_Base
Composer name
loki/magento2-base
Composer version
1.1.6
Default branch
master
Requirements
loki/magento2-css-utils: ^1.0
magento/framework: ^103.0
magento/module-store: ^101.0
Releases
dev-master#751b72bbdf3838834340572be53811debf67b9c0 |
20 October 2025 |
1.1.6 |
20 October 2025 |
1.1.5 |
20 October 2025 |
1.1.4 |
20 October 2025 |
1.1.3 |
20 October 2025 |
1.1.2 |
20 October 2025 |
1.1.1 |
20 October 2025 |
1.1.0 |
20 October 2025 |
1.0.4 |
20 October 2025 |
1.0.3 |
20 October 2025 |
1.0.2 |
20 October 2025 |
1.0.1 |
20 October 2025 |
1.0.0 |
20 October 2025 |
Changelog
[1.1.6] - 09 October 2025
Fixed
- Adjust messages under Luma from z-index:300 to 100 to prevent clash with minicart
[1.1.5] - 08 October 2025
Fixed
- Remove cookies by stripping all non-relevant cookie parts
- Change messages to position:sticky in Luma
[1.1.4] - 07 October 2025
Fixed
- Allow for JS translations of dates
[1.1.3] - 30 September 2025
Fixed
- Use new LOKI_THEME_URL variable in JS
[1.1.2] - 30 September 2025
Fixed
- Remove block cache lifetime
[1.1.1] - 29 September 2025
Fixed
- When removing cookies, ignore the domain-value
[1.1.0] - 23 September 2025
Added
- Add Loki Component exception as complex message
- Move messages timeout configuration from
Loki_Components
to Loki_Base
- Add custom Block class that adds layout-name to cache key info
- Move frontend assets to base to allow for admin features
- Add custom event "loki:init:localstorage-store"
Fixed
- Remove redundant CSS classes from icon containers
- Reset message timeout to 5000
- Rename
loki.script
from container to block to allow caching
- Skip handling messages via cookies and localStorage under Hyva
- Rewrite transfer of global messages from components to be a lot simpler
- Rename loki-directive to loki.script.directive
- Rename loki-store to loki.script.store
- Rename loki-components to loki.script.component
- Rename loki-component-types to loki.script.component-type
- Rename loki-component-partials to loki.script.component-partial
- Cleanup duplicate containers, move to
Loki_Base
[1.0.4] - 17 September 2025
Fixed
- Re-add styling of buttons
[1.0.3] - 17 September 2025
Fixed
- Really move all LESS away from CSS folder
[1.0.2] - 17 September 2025
Fixed
- Move experimental LESS sources away from compilation
- Remove console.log message
- Remove dep with
Loki_Components
[1.0.1] - 17 September 2025
Fixed
- Disable Tailwind for LESS for now (experimental)
[1.0.0] - 17 September 2025
Fixed
- Add LESS sources
- Prevent weird mage-messages cookie value from breaking things
- New ViewModel
- Properly implement section invalidation from Luma customerData JS
- Always use get('messages') when retrieving message section from store
- Remove expired sections in localStorage
- Remove messages with ESC
- Add box shadow to messages
- Sef long lifetime on
user_allowed_save_cookie
cookie
- Fix CSP compliance of message timeout
- Better notice colors under Luma
- Better API for cookies and messaging
- Fix mobile menu
- Correct padding of message close button under Luma
- Set timeout to 10000
- Move LokiComponents global messages to regular messages template
- Add to both Hyva and Luma
- Add SVG and click button to remove message
- Add close X
- Autoremove messages or double-click to remove
- Copy generic CI/CD files
- Adding all files to git via Yireo Command
[0.0.1] - 13 September 2025
Added
Last modified: September 16, 2025