Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

min/max $ limits added to checkout_confirmation.php


groggie

Recommended Posts

If anyone is interested, for Bank requirements, I have set a min and a max total price level on the checkout_confirmation.php page. Just change the $min & $max value to whatever you need.

 

I also moved the

<tr>

<td class="main"><b><?php echo HEADING_BILLING_INFORMATION; ?></b></td>

</tr>

down the page a bit, to make it look tidy.

I made this modification, as the bank payment interface errors weren't working properly.

 

From about line 290 to 342 of the page, the code is

"

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<?php

}

?>

<!-- brought the Billing Info heading down to here from above HEADING_BILLING_ADDRESS, and removed the above/below separators //-->

<tr>

<td class="main"><b><?php echo HEADING_BILLING_INFORMATION; ?></b></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td class="main">

<?php

/* modified code min - max $ value levels*/

if (MODULE_ORDER_TOTAL_INSTALLED) {

$order_total_modules->process();

$final_price = $order->info['total'];

$min = 20;

$max = 1000;

if($final_price > $max)

{

echo

"<table style='width:450px;height:90px;font-family:verdana,arial,sans-serif;color:red;background-color:yellow;'>

<tr>

<td>

Your current total payment (with tax and shipping) is \$";printf ('%0.2f',$final_price);echo"<br />But, there is a maximum limit of \$1,000.00 for each individual payment transaction. Please click on the \"Shopping Cart items\" -top left corner of page- to go back to your shopping cart and remove a product, so that your total will be below \$1000.00.<br />You cannot proceed past this point until you so do.<br />Thank you.</td></tr></table>";

}

else if ($final_price < $min)

{

echo

"<table style='width:450px;height;90px;font-family:arial,verdana,sans-serif;color:red;background-color:yellow;'>

<tr>

<td>

Your current total payment (with tax and shipping) is \$";printf('%0.2f',$final_price);echo"<br />But, there is a minimum limit of \$20.00 for each individual payment transaction. Please click on the \"Shopping Cart items\" -top left corner of page- to go back to your shopping cart and add a product, or substitute a product, so that your total will be above \$20.00.<br />Thank you.</td></tr></table>";

}

else{

echo "<table width=450 align=right><tr><td></td><td align=right>".

$order_total_modules->output()."</td></tr>";

if (isset($$payment->form_action_url)) {

$form_action_url = $$payment->form_action_url;

} else {

$form_action_url = tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL');

}

echo "<tr><td></td><td align=right>".tep_draw_form('checkout_confirmation', $form_action_url, 'post').

"</td></tr>";

if (is_array($payment_modules->modules)) {

echo "<tr><td></td><td align=right>".

$payment_modules->process_button();

}

echo tep_image_submit('button_confirm_order.gif', IMAGE_BUTTON_CONFIRM_ORDER)."</td></tr></table>" .'</form>' . "\n";

} // end modified code

}

?>

"

 

cheers

 

Greg

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...