Question Stop shopping cart floating?

Status
Not open for further replies.

jl255

Customer
The floating shopping cart notification overlaps my items on the right. How do i stop it from floating?
 
You would have to apply a file edit to /dbtech/vbshop/clientscript/vbshop.js, removing this code:

Code:
YAHOO.util.Event.onDOMReady(function()
{
    var scroll_offset = YAHOO.util.Dom.get('sidebar').offsetTop;
    YAHOO.util.Dom.setStyle('sidebar', 'width', YAHOO.util.Dom.getStyle('sidebar_container', 'width'));

    YAHOO.util.Event.addListener(window, 'scroll', function()
    {    
        var scroll_top = YAHOO.util.Dom.getDocumentScrollTop();
        if (scroll_top + YAHOO.util.Dom.get('sidebar').offsetHeight < YAHOO.util.Dom.get('content').offsetHeight && scroll_top > scroll_offset)
        {
            YAHOO.util.Dom.setStyle('sidebar', 'position', 'fixed');
            YAHOO.util.Dom.setStyle('sidebar', 'marginTop', '-' + scroll_offset + 'px');
        }
        else if (scroll_top > scroll_offset)
        {
            YAHOO.util.Dom.setStyle('sidebar', 'position', '');
            YAHOO.util.Dom.setStyle('sidebar', 'marginTop', ((YAHOO.util.Dom.get('content').offsetHeight - YAHOO.util.Dom.get('sidebar').offsetHeight) > 0 ? (YAHOO.util.Dom.get('content').offsetHeight - YAHOO.util.Dom.get('sidebar').offsetHeight) : 0) + 'px');
        }
        else if (scroll_top < scroll_offset)
        {
            YAHOO.util.Dom.setStyle('sidebar', 'position', '');
            YAHOO.util.Dom.setStyle('sidebar', 'marginTop', '0px');
        }
    });
});
 
Status
Not open for further replies.

Legacy vBShop

vBulletin 3.8.x vBulletin 4.x.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
1,261
Customer rating
0.00 star(s) 0 ratings
Back
Top