Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

added a file missed in prevoius commit: order.erl

  • Loading branch information...
commit 4d4f21d4eb14c3e92c523b42ac231612bfe4b2ec 1 parent 05b186b
Mino authored

Showing 1 changed file with 21 additions and 0 deletions. Show diff stats Hide diff stats

  1. +21 0 src/order.erl
21 src/order.erl
... ... @@ -0,0 +1,21 @@
  1 +%%%-------------------------------------------------------------------
  2 +%%% File : order.erl
  3 +%%% Author : <Mino@X60S>
  4 +%%% Description :
  5 +%%%
  6 +%%% Created : 12 May 2010 by <Mino@X60S>
  7 +%%%-------------------------------------------------------------------
  8 +-module(order).
  9 +
  10 +-export([add/1]).
  11 +
  12 +-include("records.hrl").
  13 +
  14 +%%====================================================================
  15 +%% API Functions
  16 +%%====================================================================
  17 +add(Cart) ->
  18 + Products = cart:get_products(Cart),
  19 + Items = [#orderItem{quantity=X, product=Y}||{X,Y} <- Products],
  20 + Order = #order{products=Items},
  21 + db:add_order(Order).

0 comments on commit 4d4f21d

Please sign in to comment.
Something went wrong with that request. Please try again.