06-01-11, 05:07 AM
I've been testing the new AJAX cart and I found that the scrolling summary is not working so well with custom layouts. On Chromium for instance it tends to be positioned outside of the screen whenever you scroll and on FF 4 there are some problems with resizing the window and then trying to scroll. In addition to that it uses the JQuery scroll event handler without a throttling mechanism in place which causes my Core i5 to spike from 6% CPU to almost 30% whenever I scroll. I have made some modifications to main.js in the templates/orderform/ajaxcart/js folder and I figured this might help somebody else so I'm attaching it to this post. I've used this tutorial http://css-tricks.com/examples/ScrollingSidebar/index.php and modified it to use the JQuery throttle plugin from here http://benalman.com/projects/jquery-throttle-debounce-plugin/ I've embedded the plug-in code within the main.js file so all you need to do is replace your main.js with the one attached here. This change causes the scroll event to only execute the code once every 250ms (configurable) so it will go easy on your clients machines.