Skip to content

Instantly share code, notes, and snippets.

@jjthrash
Created May 28, 2019 12:38
Show Gist options
  • Select an option

  • Save jjthrash/53d437363f7d366b62148f94ca54a30d to your computer and use it in GitHub Desktop.

Select an option

Save jjthrash/53d437363f7d366b62148f94ca54a30d to your computer and use it in GitHub Desktop.

Hotspotting for eCat Flipbook support

Overview

The hotspotting function works by hijacking clickable links in a flipbook PDF, extracting the item number from the link, and using that item number to find the right product. The link will be a URL of some kind.

Hotspot URL Format: The Short Version

If you want to make it easy to enter the hotspot URLs, use the following pattern: ecat://product/<itemnumber>. E.g. for product 81134AN, enter ecat://product/81134AN

If you want to make it possible to use the same PDF on the web, you can use the following pattern: https://supercat.supercatsolutions.com/vcg/m/1/product_by_number/81134AN. If/when eCat Online is set up, tapping hotspots with this format will take the user to the eCat Online page for that product. Tapping in eCat will hijack the URL and use the normal flipbook function.

Hotspot URL Format: The Long Version

eCat uses pattern matching to extract the item number from the URL. It will match anything ending with product/itemnumber or product_by_number/itemnumber, so you could even use a URL like https://www.visualcomfort.com/product/81134AN or https://www.visualcomfort.com/product_by_number/81134AN.

For the programmers: we use a regular expression to extract the URL: product(?:_by_number)?/(.*)$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment