passing product info to another product
Yep so can just create a route in the control panel.  

See: https://docs.craftcms.com/v3/routing.html

You'll see you can use a slug (using the token slug) so that Craft will validate the url actually has a valid slug on the end, or you can just use * and craft will route to this template no matter what is on the end.



(I personally prefer to create routes in source control managed &amp; commented code using the routes.php config file - https://docs.craftcms.com/v3/routing.html#advanced-routing-with-url-rules  ... so this would be something like:

'samples/sample/&lt;slug&gt;'          =&gt; ['template' =&gt; '/your/samples/template']

Then, on the main product page, build your url to the samples page as, basically:

/samples/sample/{{ thisProduct.slug }}

Then, in your samples template you just grab the last segment, as you are, and use that in your code to pre-select the particular sample from you list...as you are.

So basically, you're almost there apart from creating the route.