From c110da0da864245e47cae019b8a347367cc6430c Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Sat, 25 Apr 2015 15:02:15 -0700 Subject: selfservice quotations, #33852 --- ng_selfservice/quotation.php | 130 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 ng_selfservice/quotation.php (limited to 'ng_selfservice/quotation.php') diff --git a/ng_selfservice/quotation.php b/ng_selfservice/quotation.php new file mode 100644 index 000000000..cf455431b --- /dev/null +++ b/ng_selfservice/quotation.php @@ -0,0 +1,130 @@ + + + + +quotation_info(array( + 'session_id' => $_COOKIE['session_id'], +)); + +$can_order = 0; + +if ( isset($quotation['sections']) and count($quotation['sections']) > 0 ) { + $can_order = 1; + # there are other ways this could be formatted, yes. + # if you want the HTML-formatted quotation, use quotation_print(). + print( + ''. + '

Order summary

'. + "\n" + ); + foreach ( $quotation['sections'] as $section ) { + print( + ''. + ''. + ''. + ''. + "\n" + ); + $row = 0; + foreach ( $section['detail_items'] as $detail ) { + print( + ''. + ''. + ''. + ''. + ''. "\n" + ); + $row = 1 - $row; + } + print( + ''. + ''. + ''. + ''. + ''. + '
'. htmlspecialchars($section['description']).'
' + ); + if ( $detail['pkgnum'] ) { + print( + ''. + '' + ); + } + print( + ''. htmlspecialchars($detail['description']). ''. $detail['amount']. '
Total'. $section['subtotal']. '
'. + "\n" + ); + } # foreach $section +} + +$pkgselect = $freeside->mason_comp( array( + 'session_id' => $_COOKIE['session_id'], + 'comp' => '/elements/select-part_pkg.html', + 'args' => array( 'onchange' , 'enable_order_pkg()', + 'empty_label' , 'Select package', + 'form_name' , 'AddPkgForm', + ), +)); +if ( isset($pkgselect['error']) && $pkgselect['error'] ) { + $error = $pkgselect['error']; + header('Location:index.php?error='. urlencode($pkgselect)); + die(); +} + +?> + + +
+ + +
+ +> +
+ + +
+> + + +
+ + + -- cgit v1.2.1