Skip to content

mikkosiikaniemi/untappd-beer-search

Repository files navigation

Untappd Beer Search for WordPress

A WordPress plugin for searching Untappd for beer info via Untappd API, and saving the information into a WordPress custom post type.

A browser extension for Mozilla Firefox is included. The extension is able to inject the beer ratings to Alko website product catalog. Read more about installing DIY extensions for Firefox.

Contains ability to import Alko product catalog and use it to autocomplete beer search against the Alko catalog.

Getting started

  1. Clone this repository to wp-content/plugins.
  2. Run composer install to install the Shuchkin\SimpleXLSX dependency. It is needed for processing the Alko product catalog (available only in XLSX format).
  3. Run npm install to install the jquery.tablesorter. It is used to add dynamic column sorting to top beers tables.
  4. Activate the plugin.
  5. Fill in the plugin settings:
    • Fill in your Untappd API credentials.
    • Fill in your favorite Alko store ID.
    • Fetch the Alko price sheet data for the first time.
  6. Start making beer searches against Untappd database in "Search Untappd" plugin page.

Sequence diagram

sequenceDiagram
    participant Untappd
    participant Alko
    participant WordPress
    participant Browser extension
    WordPress->>+Untappd: Search for beer by name
    Untappd->>-WordPress: Return beer search results (IDs)
    WordPress->>+Untappd: Request beer data by ID
    Untappd->>-WordPress: Return beer data
    Alko->>WordPress: Alko product info (Excel)
    Browser extension->>+WordPress: Get beer rating by Alko product ID
    WordPress->>-Browser extension: Return beer data
    Browser extension->>Alko: Inject beer rating by Alko product ID to Alko website

Features, ideas & to-do

  • Settings page for Untappd API credentials
  • Admin page for search & save
  • Custom post type for beers
  • Localisation support
  • AJAX-based requests without page reload
  • Import data from Alko (as CSV) and match the corresponding Untappd beer ID
  • Ability to re-fetch beer info to update an existing beer
  • Taxonomies for beer type, ABV, country, brewery etc.
  • Browser extension to show ratings on Alko website.
  • Sort admin listing by rating
  • Front-end UI, not only on admin side?
  • Beer filter by type, ABV, brewery etc.
  • Search for multiple beers at once (textarea input instead of text)
  • Replace jQuery with native JavaScript
  • Process the whole Alko catalog in batches, trying to match beers as automatically as possible, skipping already imported beers
  • Remove duplicates from Alko product list (mainly due to same product being sold in different size bottles)
  • Ability to set favorite Alko store
  • Ability to update product availability in favorite Alko store and in alko.fi online webstore
  • Top rated beers view (separately for favorite Alko store and online store)
  • Ability to associate multiple Alko product numbers per saved beer (same product sold in different size bottles)