Hello,
It is easily doable without code.
In the product form, go into the Purchase tab --> Click on the "two lines two dots" button at the end of the column names --> Make sure Product Variant and Supplier Product Code are selected. Then just add the supplier, choose which variant and voila.
Like so

How do you get your price in currency to work on your salesprice? All my 15 cables are the same price...?