Skip to content

Instantly share code, notes, and snippets.

View dcuadraq's full-sized avatar

David Cuadra dcuadraq

View GitHub Profile
# this class builds a Spree::CreditCard for saved payment
# from our existing user profile structure
class SpreeCreditCardBuilder
def self.create!(user)
new(user).create_without_validation!
end
def initialize(user)
@params = {}
# spree cc icons depend on downcased cc type
require 'securerandom'
require 'em-http-request'
require 'pry-nav'
require 'json'
require 'faye/websocket'
require 'eventmachine'
require 'rest_client'
class WTV
def initialize(my_id, my_token)
@vicmaster
vicmaster / ecommerce-cheat-sheet.md
Last active May 14, 2020 14:29
eCommerce cheat sheet

Abandonment Rate:

Shopping cart abandonment is a term frequently used in the ecommerce world. Shopping cart abandonment (a.k.a cart abandonment) refers to the issue when the digital customer adds the desired product to the virtual shopping cart and leaves the digital property before completing the purchase. The abandonment rate is the ratio of the total number of abandoned shopping carts to the number of total initiated cart transactions. The metric is used to measure the performance of the digital shopping cart. A typical abandonment rate varies from 60-85%.

Abandonment Rate = Total number of abandoned carts / Total number of cart transactions

Acquisition: