Skip to content
1337 edited this page Aug 10, 2012 · 10 revisions

Versions

1

  • Silver button
  • Installs only on Shopify, as a "script tag asset"

2

  • Silver button
  • Comes with top bar
  • Installs only on Shopify, as a snippet (willet_sibt.liquid)

3

  • Blue button
  • Comes with top bar (removable)

10

  • Version bump
  • Allows votes with multiple products, aka "WOSIB mode"
  • Installs on Shopify as a snippet (willet_sibt.liquid) or as a copy-paste JS (SIBT-JS)

11

  • Shu Uemura-specific modifications (only single-product votes, vendor-specific templates, branded emails)
  • Single-product votes no longer an option on Shopify shops

Workflow

  1. user visits product page. load sibt.js.
  2. sibt.js is deprecated. server redirects request to real-sibt.js.
  3. does this shop have an account? if not, send null script.
  4. did this shop uninstall? if yes, send null script.
  5. send script to browser.
  6. script loads jquery, colorbox, and other pre-requisites on to the page.
  7. is there a product on this page? if not, attempt to create a product, and quit the script.
  8. did the user look at more than two products in this shop? if yes, show button. otherwise, quit the script.
  9. if client enabled top bar, show it.
  10. if client enabled bottom popup, show it.
  11. did the user already create a vote? if yes, swap the "ask friends" button with a "show results" button.

Install URLs

Classes

  • SIBT(App): functionality of Should I Buy This
  • SIBTShopify(SIBT, AppShopify): communication, installation, and integration code between Shopify and us
  • SIBTInstance: aka "a SIBT vote", an SIBTInstance stores information about the vote, e.g. who started the vote, which product(s) he/she chose, how many votes, etc.
  • PartialSIBTInstance(Model): deprecated; originally used to self-expire instances that do not qualify as a full vote (e.g. user did not tell us who he/she is)

Clone this wiki locally