Fix display on amount error
This commit is contained in:
@@ -2100,7 +2100,7 @@
|
||||
<div class="col-lg-9">
|
||||
<div class="input-group fixed-width-xl">
|
||||
<span class="input-group-addon">{$currency->sign}</span>
|
||||
<input type="text" class="fixed-width-xl" name="payment_amount" id="payment_amount" value="{0|string_format:"%.`$smarty.const._PS_PRICE_DISPLAY_PRECISION_`f"}" />
|
||||
<input type="text" class="fixed-width-xl" name="payment_amount" id="payment_amount" value="{if isset($smarty.post.payment_amount)}{$smarty.post.payment_amount}{else}{0|string_format:"%.`$smarty.const._PS_PRICE_DISPLAY_PRECISION_`f"}{/if}" />
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -275,7 +275,7 @@ class AdminOrdersControllerCore extends AdminController
|
||||
if ($id_cart && Validate::isLoadedObject($cart) && !$cart->id_customer) {
|
||||
$this->errors[] = $this->l('The cart must have a customer');
|
||||
}
|
||||
if (count($this->errors)) {
|
||||
if (count($this->errors) && !Tools::getValue('submitAddorder')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1010,6 +1010,10 @@ class AdminOrdersControllerCore extends AdminController
|
||||
Tools::redirectAdmin(self::$currentIndex.'&id_order='.$payment_module->currentOrder.'&vieworder'.'&token='.$this->token.'&conf=3');
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// if errors render add order form
|
||||
$_GET['addorder'] = '1';
|
||||
$_GET['cart_id'] = $id_cart;
|
||||
}
|
||||
} else {
|
||||
$this->errors[] = Tools::displayError('You do not have permission to add this.');
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="{$link->getAdminLink('AdminOrders')}&addorder&cart_id={$id_cart|escape:'htmlall':'UTF-8'|intval}&guest_id={$id_guest|escape:'htmlall':'UTF-8'|intval}" class="btn btn-primary cart_booking_btn" {if !$total_products_in_cart}disabled="disabled"{/if}>
|
||||
<a href="{$link->getAdminLink('AdminOrders')}&addorder&cart_id={$id_cart|escape:'htmlall':'UTF-8'|intval}" class="btn btn-primary cart_booking_btn" {if !$total_products_in_cart}disabled="disabled"{/if}>
|
||||
{l s='Book Now' mod='hotelreservationsystem'}
|
||||
</a>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{l s='Close' mod='hotelreservationsystem'}</button>
|
||||
|
||||
Reference in New Issue
Block a user