When using bridges such JFusion with vBulleting, using global $db; for database initialization causes to use the $db object of previous instance which can be a completely different database.
This is most obvious in ps_cart::saveCart as this is called at the end stage of checkout, which might use external $db object for registration/login handling.