From 231ad4f32950f42c76c16ab453246bedea8abf2c Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Tue, 23 Jun 2009 22:13:28 -0700 Subject: This implements the Digibug printing. When a a print request is made the digibug shopping cart is opened in a new window. When the cart is emptied, the window is closed. Users can close the window by pressing the continue shopping button --- modules/digibug/controllers/digibug.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'modules/digibug/controllers') diff --git a/modules/digibug/controllers/digibug.php b/modules/digibug/controllers/digibug.php index b0807aa5..609da875 100644 --- a/modules/digibug/controllers/digibug.php +++ b/modules/digibug/controllers/digibug.php @@ -36,12 +36,13 @@ class Digibug_Controller extends Controller { $company_id = module::get_var("digibug", "company_id"); $event_id = module::get_var("digibug", "event_id"); } - $digibug_parms = array( + $v = new View("digibug_form.html"); + $v->order_parms = array( "digibug_api_version" => "100", "company_id" => $company_id, "event_id" => $event_id, "cmd" => "adding", - "return_url" => url::abs_site($this->input->get("return")), + "return_url" => url::abs_site("digibug/close_window"), "num_images" => "1", "image_1" => $url, "thumb_1" => "$url/thumb", @@ -51,9 +52,7 @@ class Digibug_Controller extends Controller { "thumb_width_1" => $item->thumb_width, "title" => $item->title); - message::success( - t("Photo '%title' was submitted for printing.", array("title" => $item->title))); - print json_encode(array("result" => "success", "reload" => 1)); + print $v; } public function print_proxy($id, $thumb=null) { @@ -90,4 +89,7 @@ class Digibug_Controller extends Controller { } } + public function close_window() { + print ""; + } } \ No newline at end of file -- cgit v1.2.3