Commit e96e5249 authored by Malcolm Blaney's avatar Malcolm Blaney

Add default country and fix float bug when checking shipping and processing.

parent 992831c5
Pipeline #5176459 passed with stage
in 1 minute and 58 seconds
......@@ -193,7 +193,8 @@ class Cart extends Base {
'</div>'.
'<div class="form-spacing">'.
'<label for="customer-detail-country">Country:</label>'.
'<input id="customer-detail-country" size="20" maxlength="50">'.
'<input id="customer-detail-country" size="20" maxlength="50" '.
'value="'.$this->Substitute('cart-default-country').'">'.
'</div>'.
'<div class="form-spacing">'.
$this->PaymentMethods().
......@@ -585,11 +586,11 @@ class Cart extends Base {
$processing = $this->ProcessingCost($total_price);
$result['processing'] = $processing;
if ($method !== 'paypal') {
if ($shipping !== 0) {
if ($shipping > 0.01) {
$item_names .= '<tr><td>Shipping</td><td></td>'.
'<td>$'.number_format($shipping, 2, '.', '').'</td></tr>';
}
if ($processing !== 0) {
if ($processing > 0.01) {
$item_names .= '<tr><td>Processing</td><td></td>'.
'<td>$'.number_format($processing, 2, '.', '').'</td></tr>';
}
......
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