Repository navigation
Fixes
- Critical fix: Resolved
TypeError: Cannot read properties of undefined (reading 'indexOf')inbadge-renderer.js— caused bystyles.positionbeingundefinedwhen config values from previous versions weren't migrated to the new paths - PHP Config: Position now falls back to
after_old_price_inlineif the stored value is empty/null - JS Renderer: Defensive checks for
undefinedstyles, position, and badgeStyle throughout the rendering pipeline - FPC Compatibility:
setConfig()now ensurespdpStylesandlistingStylesexist even when Full Page Cache serves HTML from older module versions
New
- Page Builder Support: Added
MutationObserverin the initializer to detectpriceBoxelements added dynamically to the DOM — covers Page Builder product widgets (grid, carousel), AJAX-loaded content, and lazy-loaded blocks
Update
composer require rollpix/module-discount-badge:1.2.1
bin/magento setup:upgrade
bin/magento cache:flushFor static content in production mode:
bin/magento setup:static-content:deploy -f