loki / magento2-base
loki/magento2-base
Base utilities for any Loki behaviour
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
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
[Unreleased]
[1.1.18] - 12 February 2026
Fixed
- Allow PHP Config to read from current store level
- Allow filtering of child blocks by prefix
- Add ancestor block to children
[1.1.17] - 23 January 2026
Fixed
- Prevent empty cookie from causing JS error
[1.1.16] - 12 January 2026
Fixed
- Remove debugging console log
- Add new GitHub Action workflows
- Copy generic CI/CD files
- Copy generic CI/CD files
[1.1.15] - 06 January 2026
Fixed
- Disable messages if
MageOS_AlpineMessagesis enabled
[1.1.14] - 19 December 2025
Fixed
- Upgrade tests
- Cleanup duplicates in CHANGELOG
[1.1.13] - 11 December 2025
Fixed
- Move dependency ComponentViewModelInterface from
Loki_BasetoLoki_Components
[1.1.12] - 11 December 2025
Fixed
- Rename
LOKI_BASE_URLtoBASE_URL
[1.1.11] - 21 November 2025
Fixed
- Add compatibility with
MageOS_AlpineLoader - Replace
$block->getChildHtml()with$childRenderer->all()including better sorting - Automatically sync localStorage.setItem to Alpine store
[1.1.10] - 12 November 2025
Fixed
- Make sure component scripts are loaded after all other scripts
[1.1.9] - 12 November 2025
Fixed
- Rename LokiMessageStore to Message
- Only load MageCookies if
MageOS_AlpineLocalStorageis not enabled - Fix wrong template variable
- Rename LokiLocalStorage to LocalStorage
- Check for duplicate
MageOS_AlpineLocalStorage - Move layout that is duplicate to Mage-OS Alpine to separate handles
- Remove temporarily Tailwind LESS attempt
[1.1.8] - 03 November 2025
Fixed
- Change z-index for messages from 100 to 5
- Update composer keywords
[1.1.7] - 22 October 2025
Fixed
- Do not escape
$css()withescapeHtmlAttr()butescapeHtml()
[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_ComponentstoLoki_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.scriptfrom 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_cookiecookie - 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
- Initial release
| Version | Stability | QA Status | Compatibility | Released |
|---|---|---|---|---|
| 1.1.29 | stable | Fail | Magento 2.4.7-2.4.9 Details | 2026-05-21 11:28:19 |
| 1.1.28 | stable | Not tested | Not yet tested Details | 2026-05-08 11:23:07 |
| 1.1.27 | stable | Not tested | Not yet tested Details | 2026-05-06 17:54:50 |
| 1.1.26 | stable | Not tested | Not yet tested Details | 2026-05-06 08:19:03 |
| 1.1.25 | stable | Not tested | Not yet tested Details | 2026-05-06 07:55:48 |
| 1.1.24 | stable | Not tested | Not yet tested Details | 2026-03-28 17:21:27 |
| 1.1.23 | stable | Not tested | Not yet tested Details | 2026-03-27 19:08:07 |
| 1.1.22 | stable | Not tested | Not yet tested Details | 2026-03-02 15:57:44 |
| 1.1.21 | stable | Not tested | Not yet tested Details | 2026-02-25 09:01:36 |
| 1.1.20 | stable | Not tested | Not yet tested Details | 2026-02-19 12:11:56 |
| 1.1.19 | stable | Not tested | Not yet tested Details | 2026-02-16 10:13:48 |
| 1.1.18 | stable | Not tested | Not yet tested Details | 2026-02-12 09:14:22 |
| 1.1.17 | stable | Not tested | Not yet tested Details | 2026-01-23 10:28:46 |
| 1.1.16 | stable | Not tested | Not yet tested Details | 2026-01-12 13:51:16 |
| 1.1.15 | stable | Not tested | Not yet tested Details | 2026-01-06 12:20:06 |
| 1.1.14 | stable | Not tested | Not yet tested Details | 2025-12-19 13:25:49 |
| 1.1.13 | stable | Not tested | Not yet tested Details | 2025-12-11 11:52:17 |
| 1.1.12 | stable | Not tested | Not yet tested Details | 2025-12-11 11:30:15 |
| 1.1.11 | stable | Not tested | Not yet tested Details | 2025-11-21 18:22:25 |
| 1.1.10 | stable | Not tested | Not yet tested Details | 2025-11-12 11:45:44 |
| 1.1.9 | stable | Not tested | Not yet tested Details | 2025-11-12 07:58:01 |
| 1.1.8 | stable | Not tested | Not yet tested Details | 2025-11-03 15:06:12 |
| 1.1.7 | stable | Not tested | Not yet tested Details | 2025-10-22 11:47:46 |
| 1.1.6 | stable | Not tested | Not yet tested Details | 2025-10-09 10:51:52 |
| 1.1.5 | stable | Not tested | Not yet tested Details | 2025-10-08 11:34:33 |
| 1.1.4 | stable | Not tested | Not yet tested Details | 2025-10-07 10:17:27 |
| 1.1.3 | stable | Not tested | Not yet tested Details | 2025-09-30 13:59:45 |
| 1.1.2 | stable | Not tested | Not yet tested Details | 2025-09-30 09:38:41 |
| 1.1.1 | stable | Not tested | Not yet tested Details | 2025-09-29 13:59:45 |
| 1.1.0 | stable | Not tested | Not yet tested Details | 2025-09-23 14:43:11 |
| 1.0.4 | stable | Not tested | Not yet tested Details | 2025-09-17 18:26:26 |
| 1.0.3 | stable | Not tested | Not yet tested Details | 2025-09-17 18:18:06 |
| 1.0.2 | stable | Not tested | Not yet tested Details | 2025-09-17 17:41:20 |
| 1.0.1 | stable | Not tested | Not yet tested Details | 2025-09-17 14:56:51 |
| 1.0.0 | stable | Not tested | Not yet tested Details | 2025-09-17 13:58:14 |
Requires 5
| Package | Constraint |
|---|---|
| ext-pcre | * |
| loki/magento2-css-utils | ^1.0 |
| magento/framework | ^103.0 |
| magento/module-backend | ^102.0 |
| magento/module-store | ^101.0 |
No QA results yet
QA pipelines haven't run for this version. Compatibility and quality results appear here once the vendor publishes a tagged release that gets ingested.
More from Loki Extensions
View vendorCSS class and style utilities for Magento 2 PHTML templates
Developer debugger toolbar with various Loki Component related tabs
Developer tool to report various page loading statistics
Magento 2 module to add an Alpine.js directive x-flatpickr
Turn an existing module into recurring revenue.
If you already maintain a Magento 2 module on GitHub or GitLab, listing it on Packagento takes about five minutes. We mirror your tags, handle distribution signing, and route paid licenses through Stripe Connect, so you can keep shipping the way you already do.