📢 how to make the bottom sticky mobile panel always visible in unitheme2

By default, in UniTheme2, the bottom sticky panel on mobile devices only appears when scrolling down. If you want it to always remain visible, like in top e-commerce stores, you need to modify the code slightly.


1739615051846.webp

🔧


Open the file:
📂 js\addons\abt__unitheme2\abt__ut2.js

Replace this code:

JavaScript:
Expand Collapse Copy
if(ENABLE_STICKY_PANEL && !(_.abt__ut2.controller === 'checkout' && _.abt__ut2.mode === 'checkout')) {
    if (Math.floor(scroll) >= top_panel_height && !b.hasClass(sticky)) {
        b.addClass(sticky);
    } else if (Math.floor(scroll) < top_panel_height && b.hasClass(sticky)) {
        b.removeClass(sticky);
    }
}
});

With this:

JavaScript:
Expand Collapse Copy
if(ENABLE_STICKY_PANEL && !(_.abt__ut2.controller === 'checkout' && _.abt__ut2.mode === 'checkout')) {
    //if (Math.floor(scroll) >= top_panel_height && !b.hasClass(sticky)) {
    if (!b.hasClass(sticky)) {
        b.addClass(sticky);
        //} else if (Math.floor(scroll) < top_panel_height && b.hasClass(sticky)) {
        //b.removeClass(sticky);
    }
}
});

✅


After this modification, the bottom Mobile panel will always be visible on mobile devices.

If you have any questions or want to discuss other UniTheme2 customizations, feel free to comment below! 😊
 
Cart