Skip to content

v1.2.1 - Bugfix + Page Builder Support

Latest

Choose a tag to compare

@nmarquev nmarquev released this 26 Feb 06:05
· 6 commits to main since this release

Fixes

  • Critical fix: Resolved TypeError: Cannot read properties of undefined (reading 'indexOf') in badge-renderer.js — caused by styles.position being undefined when config values from previous versions weren't migrated to the new paths
  • PHP Config: Position now falls back to after_old_price_inline if the stored value is empty/null
  • JS Renderer: Defensive checks for undefined styles, position, and badgeStyle throughout the rendering pipeline
  • FPC Compatibility: setConfig() now ensures pdpStyles and listingStyles exist even when Full Page Cache serves HTML from older module versions

New

  • Page Builder Support: Added MutationObserver in the initializer to detect priceBox elements 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:flush

For static content in production mode:

bin/magento setup:static-content:deploy -f