Write a javascript function which we can copy & paste in browser developer console (F12 tools)
- The function should take an integer parameter.
- If input = 1 then places a button with the same style as “add to cart” button ABOVE the “add to cart” button.
- If input = 2 then places a button with the same style as “add to cart” BELOW the “add to cart” button.
- If input = 3 then places a button with the same style as “add to cart” BELOW the “buy with paypal” button.
- The new button text should be “Gifted Button”.
- When clicking the button, it should ‘console.log()’ the correct “variant id” of the product.
function placeGiftedButton(location) {
// your logic
}