In the above examples of the ShoppingCartUrl, you are sending each button to a different page. So because they are going to different pages, you would know which button was clicked. I understand you want to hide webparts on the arriving page, but are you doing this based on the button clicked or are you wanting to send some other parameter based on the product or user? I just want to understand what the querystring will accomplish if each button is navigating to a different checkout page.
A couple of thoughts on how you could do this (and I have not tried them).
First have you tried just getting the Request.Querystring object in some inline .NET code like <%=Request.Querystring("param")%>? Or writing some server side code in script tags (in the transformation) to get the Querystring and append it to the ShoppingCartUrl?
If neither of those options work, I would say you will have to build your own CartItemSelector (inherit from the base webpart) and write your own ShoppingCartUrl handler for it.
Anyway if you want to clarify more, we might be able to help more.