2

I'm trying to display a normal message if one payment method is selected in Magento 1.9 can any one help me on that? especially the locations of the files to edit?

23
  • What message you want to show and where? Commented Jul 17, 2018 at 14:18
  • I want to show (Please make sure to enable Cookies from your browser!) Commented Jul 17, 2018 at 14:24
  • when and where? Commented Jul 17, 2018 at 14:24
  • @SukumarGorai I'm using paytabs paymentmethod(it's external) Commented Jul 17, 2018 at 14:25
  • I want it to be visible under the payment method label as an Alert... when the payment method is selected Commented Jul 17, 2018 at 14:25

1 Answer 1

1

Add the below code to your footer:

<script type="text/javascript">
    jQuery(document).ready(function($){
        $('#co-payment-form dt input').on('click', function(){
            if($(this).val() == 'paytabs_server'){
                $(this).next().append('<span id="paytab_message">Please make sure to enable Cookies from your browser!</span>')
            }else{
                $('#paytab_message').remove();
            }
        });
    });
</script>

Also add this css:

<style type="text/css">
    #paytab_message{
        color: #ff0000;
        font-size: 12px;
        display: inherit;
        font-style: italic;
    }
</style>
1
  • Hi @Sukumar Gorai, There are 2 problems facing me now, 1: if you keep clicking on the radio button the message will be repeated. 2: I cannot translate the message to other language. Commented Jul 21, 2018 at 11:00

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.