If someone calls me as I'm about to buy something I don't stop talking. All I have to do is hand over the money or card which is not hindered by being on the phone. If the cashier misses out on asking me how my day was I'm sure they'll get over it.
Yes, they will. But, on the other hand, they may need to ask you a business question: Do you want it all in one bag, or two? Credit or debit? Did you notice that if you buy three of these the fourth one is free?
I used to occasionally talk on the phone while I was shopping. Then I ran into a couple cashiers who seemed hesitant to interrupt my phone conversation or were confused as to when I was speaking to them and when I was speaking to the person on the phone. So I stopped.
Come to think of it, when I'm shopping with friends, we tend to stop talking when we get to the cashier. It's not just phones.