# How to override a function in one controller to another controller?

**URL:** <https://forum.shopware.com/t/how-to-override-a-function-in-one-controller-to-another-controller/69858>\
**Category:** General Questions (EN)\
**Created:** [26. September 2020 um 07:05 UTC](https://forum.shopware.com/t/how-to-override-a-function-in-one-controller-to-another-controller/69858 "2020-09-26T07:05:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aswathy](https://avatars.discourse-cdn.com/v4/letter/a/edb3f5/32.png) [@aswathy](https://forum.shopware.com/u/aswathy)\
**Post date:** [26. September 2020 um 07:05 UTC](https://forum.shopware.com/t/how-to-override-a-function-in-one-controller-to-another-controller/69858/1 "2020-09-26T07:05:53Z")

</div>

Need to override confirmPage function in ClearcartController (currently in&nbsp;Checkoutcontroller.php)&nbsp;to add custom code. Could anyone help me in directing how to proceed in Shopware6… Thanks…
