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"
  • Integrates ask page with vote page
  • 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.
  12. user clicks on button (on either top bar, bottom popup, or the main button).
  13. show the ask screen (ask.html) or the ask page (ask-page.html) depending on client, vendor, and user.
  14. user clicks on either "ask friends" or "post on wall" (or "email", depending on UI configuration).
  15. a link to the vote is transmitted to the user's wall, their friends' walls, and/or their inboxes.
  16. user's friends click the link to arrive at vote.html.
  17. user's friends vote either yes (SIBT), no (SIBT), or a specific product (WOSIB).
  18. when 6 hours pass, vote completes (SIBTVoteCompletion).

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)

How-to

  • Open up for another vendor: copy the /apps/sibt/shuuemura folder. Change the client's name in views.py.

Clone this wiki locally