Adding a second ‘Add to cart’ button which changes the products price when added to the cart

  javascript, php, woocommerce, wordpress

I’m currently building a website for a university project, where we need to build a unique ecommerce website using a content management system. The ‘unique’ part of this one is that the customer has the option to buy a product as a ‘gift’ for someone else, with a discounted price. I currently have a normal ecommerce products page, however, I wish to add a second button next to ‘add to cart’ which adds the product to the cart with a discount of 20%. I have been scavenging everywhere to find an answer to no avail, and would appreciate any guidance.

Something to note as well, I am using Elementor and have used this to create templates for the product pages and so forth, as well as individual product pages, and consequently, to create the two different ‘add to basket’ buttons.

Source: Ask PHP