I have a page that contains 3 blocks, the user selects one or more items on the first block, this makes the second block appear. The user then selects one or more items on the second block.

After selecting 'next' a third block appears with products related to the selections made in the first 2 blocks.

I've found some information about passing variables to a view using contextual filters, but I'm not clear on exactly how this works still (how do I set up a filter, how do I access the value in the target block, how do the values get passed, on the URL, as session values?) also my situation involves passing variables from 2 view blocks to another view block.

And presumably AJAX would need to be used to load the third view?

I could split the third block into 2 and display results from block one and block two separately, if that's any easier.

But I'm really not sure how to set up a filter or how to use the passed values, or how exactly contextual filters work, any guidance appreciated.