You shouldn’t need to imagine anything. You should know exactly what your variables hold in all places, and if you don’t, you can use debug($carrinho)
or the like to find out. Just trying to include variables in your link and hoping they’ll work isn’t a good way to attack the problem.