Commit 1bad105c authored by Mario's avatar Mario

bring back the checkout links

parent dadd9a1e
......@@ -1543,6 +1543,7 @@ function cart_checkout_start (&$hookdata) {
return "<h1>".t("No Order Found")."</h1>";
}
$order = cart_loadorder($orderhash);
$ordermeta = cart_getorder_meta($orderhash);
unset($ordermeta["paytype"]);
cart_updateorder_meta($ordermeta,$orderhash);
......
......@@ -22,6 +22,7 @@ function cart_checkout_complete (&$hookdata) {
function cart_checkout_manual (&$hookdata) {
$page_uid = ((App::$profile_uid) ? App::$profile_uid : local_channel());
$nick = App::$profile['channel_address'];
$manualpayments = get_pconfig($page_uid,'cart','enable_manual_payments');
$manualpayments = isset($manualpayments) ? $manualpayments : false;
......@@ -44,6 +45,7 @@ function cart_checkout_manual (&$hookdata) {
$order["payopts"]=$manualpayopts;
$order["finishedtext"]=t("Finished");
$order["finishedurl"]= z_root() . '/cart/' . $nick;
$order["links"]["checkoutlink"] = z_root() . '/cart/' . $nick . '/checkout/start?cart='.$order["order_hash"];
$template = get_markup_template('basic_checkout_manual_confirm.tpl','addon/cart/');
$display = replace_macros($template, $order);
......
......@@ -7,9 +7,10 @@
<div class="section-content-wrapper">
{{if !$order.checkedout}}
<div id="paypal-button"></div>
<div class="clearfix">
<div id="paypal-button" class="float-left mr-2"></div>
<a href="{{$links.checkoutlink}}" class="float-left p-1">Back to Payment Options</a>
</div>
<script>
paypal.Button.render({
env: '{{$paypalenv}}',
......
......@@ -59,14 +59,6 @@
<td style="text-align:right;">{{$totals.Payment}}</td>
</tr>
{{/if}}
{{**if !$order.checkedout}}
<tr>
<td></td>
<th>Order Not Checked Out</th>
<td><a href="{{$links.checkoutlink}}">Check Out</a></td>
</tr>
{{/if**}}
</table>
</div>
<!-- basic_checkout_*.tpl -->
......@@ -15,6 +15,7 @@
<input type=hidden name="cart_posthook" value="manual_checkout_confirm">
<input type=hidden name="orderhash" value="{{$order_hash}}">
<button class="btn btn-primary" type="submit" name="Confirm" id="cart-submit-button" value="Confirm">Confirm Order</button>
<a href="{{$links.checkoutlink}}" class="btn btn-outline-secondary">Back to Payment Options</a>
</form>
{{else}}
<h3>This order has been confirmed and is awaiting payment.</h3>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment