Need to add buttons with corresponding links on product pages

Hi, sorry if this is the wrong place to ask this question.

I created a website using an Ecommerce template, but I also want to add the possibility for people to go to Amazon from my product page and make the purchase there. The problem is I can’t add custom buttons for all products.

You can simply add it to a custom field in your Wix Stores Products collection, so that the user can simply use the custom text given.
https://support.wix.com/en/article/corvid-wix-stores-products-collection-fields#custom-text-fields-customtextfields

Otherwise you can simply have a database with the product id and that products outside url in it and then in the pages onReady function, query this database for the same product id as the product on the product page. From this result, you can simply use the appropriate outside url as the link for the button itself.

By chance is there a basic/generic code for the button connected to database with product id option that I could see?

I already have the database set-up, I just can’t seem to visualize the code to use for the buttons… Thanks…