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?
-
What message you want to show and where?– Sukumar GoraiCommented Jul 17, 2018 at 14:18
-
I want to show (Please make sure to enable Cookies from your browser!)– Monty NabeelCommented Jul 17, 2018 at 14:24
-
when and where?– Sukumar GoraiCommented Jul 17, 2018 at 14:24
-
@SukumarGorai I'm using paytabs paymentmethod(it's external)– Monty NabeelCommented 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– Monty NabeelCommented Jul 17, 2018 at 14:25
|
Show 18 more comments
1 Answer
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>
-
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