Quote Originally Posted by flyvholm View Post
So in order to troubleshoot I'm still stuck with the original question... what code is executed immediately upon clicking "add to cart", before application_top.php?
Quick answer: nothing.

application_top.php is the first module loaded by /index.php. The module that does get control on an add-to-cart action is /includes/main_cart_handler.php, loaded late in the start-up process; depending on the cart-related request, it will call one of the shopping_cart class functions.