TastyIgniter Forums
[Solved] Customer clicks Confirm button multiple Submits - Printable Version

+- TastyIgniter Forums (https://forum.tastyigniter.com)
+-- Forum: TastyIgniter 2.x.x Development (https://forum.tastyigniter.com/forum-18.html)
+--- Forum: 2.x.x - Suggestions and Feedback (https://forum.tastyigniter.com/forum-19.html)
+--- Thread: [Solved] Customer clicks Confirm button multiple Submits (/thread-1077.html)



[Solved] Customer clicks Confirm button multiple Submits - zeta - 22 Feb

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>';