Permalink
Browse files

Added check_access=0, product list works for others than superusers t…

…oo :)
  • Loading branch information...
apeisa committed Feb 19, 2012
1 parent 0541b05 commit 7ea01961cddebac4f26ad1b7df991b6d2063daec
Showing with 6 additions and 3 deletions.
  1. +6 −3 PaymentExample.module
View
@@ -60,15 +60,14 @@ class PaymentExample extends PaymentAbstract {
$out .= "<ul>";
// Products
- foreach($order->children as $p) {
+ foreach($order->children('check_access=0') as $p) {
$out .= "<li><strong>{$p->title}</strong> {$p->sc_price}€ x {$p->sc_qty} (total: ". $p->sc_qty * $p->sc_price ."€)</li>";
}
$out .= "</ul>";
$out .= "<h2>Shipping details</h2>";
$out .= "<ul>";
- // Products
$out .= "<li>First name: $order->sc_firstname</li>";
$out .= "<li>Last name: $order->sc_lastname</li>";
$out .= "<li>Email: $order->email</li>";
@@ -80,7 +79,11 @@ class PaymentExample extends PaymentAbstract {
$out .= "<li>Email address from user: {$order->sc_customer->email}</li>";
$out .= "</ul>";
-
+ $out .= "<h2>Other interesting stuff</h2>";
+ $out .= "<ul>";
+ $out .= "<li>Current url: {$this->currentUrl}</li>";
+ $out .= "<li>Completed url: {$this->completedUrl}</li>";
+ $out .= "</ul>";
// Usually we would use some payment api or send people to 3rd party service like paypal
// and process their reply

0 comments on commit 7ea0196

Please sign in to comment.