Skip to content

Instantly share code, notes, and snippets.

@AlexRiina
Created November 3, 2017 19:33
Show Gist options
  • Save AlexRiina/c62b007464eb31089ef74816a5959bf5 to your computer and use it in GitHub Desktop.
Save AlexRiina/c62b007464eb31089ef74816a5959bf5 to your computer and use it in GitHub Desktop.
Walmart BuyNow MVP with Javascript API
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<title>Index</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.slim.js"></script>
</head>
<body>
<div class="walmart-buy-now" data-publisherid="PD0Em23B4ME" data-item-walmartid="45698070|2,631|1" data-color="orange" data-size="standard"></div>
<script>
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "https://affil.walmart.com/buttons/buynow.min.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'walmart-buynow-js'));
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment