How to setup separate “Yes / Buy now / Add to cart” buttons for each variation on a single upsell page?

For example you have an upsell page with 2 or 3 columns, describing different options or packages of your product, and each column has a “Buy now” button. But you have only 1 variable product with 3 variations.

What you need to do in this scenario:

You need to append your selected variation attribute(s) to the # button in a format like this:

#

You can get the NAME and the VALUE from the select boxes on the product’s page.

For example, Special Delivery options:

Only CDs: #
Only MP3s:  #
Both MP3s and CDs:  #