Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 4d4f21d4eb
Fetching contributors…

Cannot retrieve contributors at this time

22 lines (18 sloc) 0.661 kB
%%%-------------------------------------------------------------------
%%% File : order.erl
%%% Author : <Mino@X60S>
%%% Description :
%%%
%%% Created : 12 May 2010 by <Mino@X60S>
%%%-------------------------------------------------------------------
-module(order).
-export([add/1]).
-include("records.hrl").
%%====================================================================
%% API Functions
%%====================================================================
add(Cart) ->
Products = cart:get_products(Cart),
Items = [#orderItem{quantity=X, product=Y}||{X,Y} <- Products],
Order = #order{products=Items},
db:add_order(Order).
Jump to Line
Something went wrong with that request. Please try again.