Partners and APIs

Pricing Widget

Our pricing widget can be embedded on any page using the details below.

1. Initialize JavaScript

Somewhere in your site's code - preferably in a shared file like a base template add the following code snippet:


              <script src="https://findwines3a.s3.amazonaws.com/js/price-widget-v1-bundle.js"></script>
              <script>
                    var findwinePartnerId = '{YOUR_FINDWINE_PARTNER_ID}';
                    document.addEventListener('DOMContentLoaded', function() {
                          FindWine.init(findwinePartnerId);
                    }, false);
              </script>
          

Your Partner ID can be obtained from your findwine representative.

2. Embed HTML

Now, wherever you want to display the wine price widget you can put the following HTML code:


              <div id="findwine-price-widget" data-findwine-id="{wine-id}" ></div>
          

The wine-id that should be used can be copied from the URL of the wine listing on findwine.com. For example, to list Tokara Cabernet Sauvignon 2014 you would use the following code snippet:


              <div class="findwine-price-widget" data-findwine-id="tokara-cabernet-sauvignon-2014" ></div>