I need to execute my custom code on clicking proceed to checkout button.
Can we trigger the action, I need to insert quote Id with some other details to
custom table.
How this can be done, is there any methods like Plugin, event or something else to achieve this?
Best Answer
Here you need to build a module in which you need to use event 'controller_action_predispatch_checkout_index_index'.
Create registration.php
Create module.xml under etc directory
Create events.xml under etc/frontend directory
Create CheckShoppingCartObserver.php file under Observer directory.
For deleting your particular quote please try this in your observer file's method