I tried to find where did a button send data to do something. For example, for a button below, it is a button on "Ship to Multiple Addresses" page.

<button type="button" title="<?php /* @escapeNotVerified */ echo __('Enter a New Address') ?>" class="action add" data-role="add-new-address">
      <?php /* @escapeNotVerified */ echo __('Enter a New Address') ?>

So, where i can find the logic for that button? Is it in controller? or other place?

1 Answer 1


You can find newShipping button logic from below file, Logic is reside in contorller file.


Go to execute function and you can find your logic as above file.


  • Thank you for your answer, but how could that button call that controller? Is it by class? or by data role? Sep 18, 2017 at 6:40
  • By default button click form submit, you can check form action above button html and on form action they redirect to above action. Sep 18, 2017 at 6:41
  • It is called getPostActionUrl(), and it is return $this->getUrl('*/*/addressesPost'); Is that mean its called controller with name "AddressesPost.php"? Sep 18, 2017 at 6:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.