On com_sales, the total function relied on the session user data to calculate tax, but there are times when a visitor should be able to make a payment for something without being signed in. To avoid the error, we check if the session user isset.