I have a problem:
I need that my clients check the radio button to select the shipping method (pickup, delivery,...).
I don't want the first shipping method by default checked.
So I removed the checked="checked" from the input radio shipping method in chekout.tpl.
The problem I have is if the client does not select a shipping method, he can checkout and pay.
I need to have a warning message and something who check if radio button of shipping method is o no checked.
I don't understand why there is no warning message for this.
Is there a check (radio:checked) for the shipping method?
Where can I find it?
I have seen this in my one page checkout tpl:
Code: Select all
jQuery(".shipping-method").load('index.php?route=checkout/checkout/shipping_method', $('.checkout_form input[type=\'text\'], .checkout_form input[type=\'date\'], .checkout_form input[type=\'datetime-local\'], .checkout_form input[type=\'time\'], .checkout_form input[type=\'password\'], .checkout_form input[type=\'hidden\'], .checkout_form input[type=\'checkbox\']:checked, .checkout_form input[type=\'radio\']:checked,input[name=\'shipping_method\']:first, .checkout_form textarea, .checkout_form select'), function()
{
if (jQuery("input[name=\'shipping_method\']:first").length)
{
jQuery("input[name=\'shipping_method\']:first").attr('checked', 'checked').prop('checked', true).click();
} else
{
jQuery("#cart_table").load('index.php?route=checkout/checkout/cart', $('.checkout_form input[type=\'text\'], .checkout_form input[type=\'date\'], .checkout_form input[type=\'datetime-local\'], .checkout_form input[type=\'time\'], .checkout_form input[type=\'password\'], .checkout_form input[type=\'hidden\'], .checkout_form input[type=\'checkbox\']:checked, .checkout_form input[type=\'radio\']:checked, .checkout_form textarea, .checkout_form select'));
}
});
Thank u very much for your help.
Opencart V2.0.1.1