TastyIgniter Forums

Full Version: [Solved] Customer clicks Confirm button multiple Submits
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I just noticed that when a customer places an order. In Step 2 Payment page, if they click on "Confirm" button multiple times, then multiple orders would go through.

The "Confirm" button needs to be disabled once it gets clicked the first time.

Solution/Fix:

Line 279, \tastyigniter\extensions\cart_module\controllers\Cart_module.php
Code:
$data['button_order'] = '<a class="btn btn-order btn-primary btn-block btn-lg" onclick="$(this).attr(\'onclick\',\'\'); $(\'#checkout-form\').submit();">' . $this->lang->line('button_confirm') . '</a>';