1

I need to remove a "OK" button from customer register/login modal pop up and can't find the template anywhere. I can find the login.phtml file, however, the footer modal is not there.

Working on Magento ver. 2.1.8 and a custom theme.

Can anyone direct me?

enter image description here enter image description here

UPDATE:

Grep result:

[frontend]$ grep -rni "Magento_Ui/js/modal/alert" /microcloud/domains/operm2/domains/domain.co.uk/http/app/design/frontend
/microcloud/domains/operm2/domains/domain.co.uk/http/app/design/frontend/Venustheme/cricket_child/Magento_Checkout/web/js/sidebar.js:11:    'Magento_Ui/js/modal/alert',
grep: /microcloud/domains/operm2/domains/domain.co.uk/http/app/design/frontend/Venustheme/cricket_child/Ves_Themesettings/web/css/[email protected]: No such file or directory
grep: /microcloud/domains/operm2/domains/domain.co.uk/http/app/design/frontend/Venustheme/cricket_child/Ves_Themesettings/web/css/paneltool.css: No such file or directory
grep: /microcloud/domains/operm2/domains/domain.co.uk/http/app/design/frontend/Venustheme/cricket_child/Ves_Themesettings/web/css/fancybox_overlay.png: No such file or directory
grep: /microcloud/domains/operm2/domains/domain.co.uk/http/app/design/frontend/Venustheme/cricket_child/Ves_Themesettings/web/css/fancybox_sprite.png: No such file or directory
grep: /microcloud/domains/operm2/domains/domain.co.uk/http/app/design/frontend/Venustheme/cricket_child/Ves_Themesettings/web/css/fancybox_loading.gif: No such file or directory
grep: /microcloud/domains/operm2/domains/domain.co.uk/http/app/design/frontend/Venustheme/cricket_child/Ves_Themesettings/web/css/styles.css: No such file or directory
grep: /microcloud/domains/operm2/domains/domain.co.uk/http/app/design/frontend/Venustheme/cricket_child/Ves_Themesettings/web/css/jquery.fancybox.css: No such file or directory
grep: /microcloud/domains/operm2/domains/domain.co.uk/http/app/design/frontend/Venustheme/cricket_child/Ves_Themesettings/web/css/[email protected]: No such file or directory
grep: /microcloud/domains/operm2/domains/domain.co.uk/http/app/design/frontend/Venustheme/cricket/Ves_Megamenu/web/css/styles.css: No such file or directory
6
  • can you add your login popup js code ? Commented Jan 25, 2018 at 9:49
  • Can you tell me how to find the JS for this pop-up or a way to track it down?
    – Greg
    Commented Jan 25, 2018 at 9:51
  • Give me the website link. Commented Jan 25, 2018 at 9:52
  • Did you manage to find anything?
    – Greg
    Commented Jan 25, 2018 at 10:09
  • More information required to solve this issue. Commented Jan 25, 2018 at 10:12

1 Answer 1

1

As this is a custom theme I'm not sure the exact location of files needed to modify. Search your custom theme for Magento_Ui/js/modal/alert. Something like grep -ir "Magento_Ui/js/modal/alert" via ssh from the themes directory will show all files within the theme that have the modal widget. One of these will be your login modal which we can modify.

The modals look like below however am not sure there is an option to hide the footer. This could be achieved by doing similar to the below:

require([
                'jquery',
                'Magento_Ui/js/modal/alert'
            ],
            function($, alert) {
               alert({
                    title: "Hello",
                    content: "World",
                    autoOpen: true,
                    clickableOverlay: false,
                    focus: "",
                    actions: {
                        always: function(){
                            console.log("modal closed");
                        }
                    }
                });
                $(".modal-footer").hide();
            }
        );

Adding the $(".modal-footer").hide(); like above will hide the footer.

9
  • Have a look at the result from grep in my updated question
    – Greg
    Commented Jan 25, 2018 at 10:35
  • I cant see what the file would be from there unless its the first sidebar one check that out see if that is the modal in question. Are there any modules with this theme?
    – harri
    Commented Jan 25, 2018 at 10:38
  • There is nothing regarding modal-footer. Not even one mention :/
    – Greg
    Commented Jan 25, 2018 at 10:42
  • Nah there wont be. I added that in.
    – harri
    Commented Jan 25, 2018 at 10:42
  • I would check the code folder with the same grep command
    – harri
    Commented Jan 25, 2018 at 10:43

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.