Commit 74d2b43b authored by Malcolm Blaney's avatar Malcolm Blaney

A few small ui changes to the Cart module.

parent 45701a03
......@@ -599,6 +599,9 @@ class Cart extends Base {
return "There was a problem processing your details.<br>".
"Please contact support.";
}
// Look up customer in data to automatically set the card name.
$customer = $data["Customer"];
$full_name = $customer["FirstName"]." ".$customer["LastName"];
// Generate year options.
$long = (int)date("Y");
$short = (int)date("y");
......@@ -606,14 +609,12 @@ class Cart extends Base {
for ($i = 0; $i < 7; $i++) {
$options .= '<option value="'.$short++.'">'.$long++.'</option>';
}
// Look up customer in data to automatically set the card name.
$customer = $data["Customer"];
return
'<form id="eway-form" action="'.$form_action_url.'" method="post">'.
'Please enter your credit card details:<br>'.
'<label for="eway-name">Name: </label>'.
'<input id="eway-name" name="EWAY_CARDNAME" '.
'value="'.$customer["FirstName"].' '.$customer["LastName"].'">'.
'value="'.$full_name.'"><br>'.
'<label for="eway-number">Number: </label>'.
'<input id="eway-number" name="EWAY_CARDNUMBER" size="15" '.
'maxlength="50"><br>'.
......@@ -640,7 +641,7 @@ class Cart extends Base {
'</select><br>'.
'<input type="hidden" name="EWAY_ACCESSCODE" '.
'value="'.$access_code.'">'.
'<button>Submit</button>'.
'<button id="cart-payment">Submit</button>'.
'</form>';
}
// If no data was provided, check the payment result.
......
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