User:Lucia Dossin/Self-directed Research/Exercise1: Difference between revisions

From XPUB & Lens-Based wiki
No edit summary
No edit summary
Line 18: Line 18:


<h3>Screenshots</h3>
<h3>Screenshots</h3>
Plugin
Plugin<br>
Website
Website
<h3>Code</h3>
<h3>Code</h3>
Plugin
Plugin<br>
Scraping
Scraping



Revision as of 15:57, 6 August 2014

Prototype

Let me think - a truly customized online shopping experience

Let me think is a browser plug-in that interferes in the online shopping experience at Amazon by canceling the 'buy in one click' feature. Being a plugin, it means it has to be downloaded and installed. It requires that the user performs some action to make it happen.

Once it is installed, when I visit the Amazon.com website, the 'Add to Cart' button is removed from the page. In its place, my own button is used. This personalized, truly customized button does not behave as the original one: instead of putting the products in the shopping cart immediately, a pop up screen is displayed, with a question such as 'Do you really need to buy a [name of product]?Take your time and think about it.' I can then Cancel the plug-in and go back to Amazon's regular website or keep thinking about the purchase. The pop up screen will be withdrawn in any case, but if I chose to keep thinking, by clicking on the modified button again, a new question will be displayed and the purchase is postponed one more time.

By adding time to the shopping cycle, I'm trying to break this automatic, almost unconscious behavior that web shops wants us to engage with: just clicking on things and buying without reflecting on what we're doing.

The plugin is being wrapped in a website, where a brief explanation about it will be given. There will also be a tutorial on how to install everything that is needed and on how to use the code, even allowing(/encouraging) further customization by the user, if (s)he wishes so. The website and the tutorial are an essential part of this project.

Yet to be done

  1. Test the tutorial
  2. Add more URLs in the table
  3. Test the automated scraping for these URLs, compare to the manual scraping

Screenshots

Plugin
Website

Code

Plugin
Scraping

Exercise 1

What happens when there's time to reflect on what you're doing online? In this specific case, when you're buying something?

Description

A Firefox plugin that interferes in the shopping flow by delaying the 'Add to Cart' action.

Instead of putting the product in the shopping cart after just one click, one question (out of a set) is presented on screen each time the User clicks the 'Add to Cart' button. In the current structure, by clicking OK, this mechanism is kept activated. By clicking Cancel, the mechanism is canceled and the User will then be able to put the product in the shopping cart. Besides that, while the mechanism ia active, the main product picture is substituted (currently by a 'garbage monster').

This is an ongoing exercise, currently a mock-up. Yet to be done/tested:

  • design another 'Add to Cart' button. Currently there's a sandclock to indicate whether the mechanism is activated or not.
  • questions posed will make stronger use of graphic language (instead of the default javascript gray boxes). OR there will be no overwhelming graphic elements and no questions. Just the need to click the 'Add to Cart' button N times before a product is put there. Second option seems more attractive to me.
  • questions posed could be more persuasive (if there are any questions at all).

Screenshots

File:Lucia SDR Output2.ogv

Code

// ==UserScript==
// @name	Postpone Add to Cart
// @description	Initially just trying things out.
// @grant none
// @include http://www.amazon.tld/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// @version 0.1
// ==/UserScript==


$('div.a-button-stack').css('display','none');

function htmlToDomNode(html) {
	var container = document.createElement('div');
	container.innerHTML = html;
	return container.firstChild;
}

$('#bbop').after(
    htmlToDomNode('<div class="new" id="more-time" style="cursor: pointer;"><img src="http://thecatlab.com/inc/img/new_cart.png" title="More Time is enabled" /></div>')
);

product_name = $('span#productTitle').text();
product_price = $('span#priceblock_ourprice').text();
product_image = $('li.image img').attr('src');

args = [
        'Take some time to think about it, you really don\'t have to rush.',
        'Maybe you don\'t really a '+ product_name + '. Do you?',
        'Can\'t you think of something more useful to do with ' +product_price + ' than buying this?',
        'Have you already considered the amount of garbage involved in the making, selling and discarding of a product such as '+product_name+'?',
        'Check what Richard Stallman has to say about Amazon:\n http://stallman.org/amazon.html'
       ];
i = 0;

$('#more-time').on('click', function(){
    $('li.image img').attr('src' , 'http://thecatlab.com/inc/img/uaha.jpg'); 
    if(i<=args.length-1){
       conf(i);
       i++;
    }else{
       i = 0;
       conf(i);
       i = 1;
    }
});

function conf(i){
  if(confirm(args[i])){
     //do_something_here() (or not!)
  }else{
     erase_it()
  }; 
  return false;
}

function erase_it(){
  $('div.a-button-stack').css('display','block');
  $('div.new').css('display','none');
  $('li.image img').attr('src' ,product_image);
}