-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Arjan Scherpenisse
committed
Dec 20, 2011
1 parent
f857b02
commit 7d1e645
Showing
9 changed files
with
159 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
%% @author Arjan Scherpenisse <arjan@scherpenisse.net> | ||
%% @copyright 2011 Arjan Scherpenisse <arjan@scherpenisse.net> | ||
%% Date: 2011-12-05 | ||
|
||
%% @doc Add a rsc id to the cart | ||
|
||
%% Copyright 2011 Arjan Scherpenisse | ||
%% | ||
%% Licensed under the Apache License, Version 2.0 (the "License"); | ||
%% you may not use this file except in compliance with the License. | ||
%% You may obtain a copy of the License at | ||
%% | ||
%% http://www.apache.org/licenses/LICENSE-2.0 | ||
%% | ||
%% Unless required by applicable law or agreed to in writing, software | ||
%% distributed under the License is distributed on an "AS IS" BASIS, | ||
%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
%% See the License for the specific language governing permissions and | ||
%% limitations under the License. | ||
|
||
-module(action_shop_update_cart_amount). | ||
-author("Arjan Scherpenisse <arjan@scherpenisse.net>"). | ||
|
||
-include("action_postback.hrl"). | ||
|
||
postback(Args, Context) -> | ||
{item, Item} = proplists:lookup(item, Args), | ||
Amount = z_convert:to_integer(z_context:get_q("triggervalue", Context)), | ||
m_shoppingcart:update_cart(Amount, Item, Context), | ||
Context. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[ | ||
{shop_order_status, ["shop", "order", id], resource_template, [{template, "shop_order_status.tpl"}]} | ||
]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,19 @@ | ||
|
||
-record(payment_provider, | ||
{name, module, action}). | ||
{name, module, function}). | ||
|
||
-record(payment_status, | ||
{status, order_id, details=[]}). | ||
|
||
-record(shop_order, | ||
{cart=[], % the items | ||
details=[], % address details | ||
|
||
status, | ||
id, | ||
email, | ||
shopper_ref, | ||
|
||
price_ex_vat=0, % in cents | ||
price_inc_vat=0 % in cents | ||
}). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{% extends "page.tpl" %} | ||
|
||
{% block content %} | ||
{% with m.rsc[q.id] as r %} | ||
|
||
<h1>{{ r.title }}</h1> | ||
|
||
{% print r.status %} | ||
|
||
{% endwith %} | ||
|
||
{% endblock %} |