Jump to content

Display individual divisions for each carrier by, onclick radio button (carriers section) ..


Recommended Posts

Hi ....Please help me out with this problem

 

In Checkout Page i have an option for selecting a carrier by radio button and based on click of radiobutton i.e., carrier options i would like to display seperate division for each ,so here i caught the id of the radiobutton and by using jquery i wrote this code.

 

<script type="text/javascript">
$(document).ready(function() {
$("#deliverydays").hide();
$("#delivery_option_{$id_address|intval}_0").click(function() {
$("#deliverydays").hide();
});
$("delivery_option_{$id_address|intval}_1").click(function() {
$("#deliverydays").show();
});
});
</script>
 

<input id="delivery_option_{$id_address|intval}_{$option@index} " class="delivery_option_radio" type="radio" name="delivery_option[{$id_address|intval}]" data-key="{$key}" data-id_address="{$id_address|intval}" value="{$key}"{if isset($delivery_option[$id_address]) && $delivery_option[$id_address] == $key} checked="checked"{/if} />

 

 

in order-carrier.tpl file

 

here i want show a division when id="delivery_option_{$id_address|intval}_{$option@index} " where {$option@index} is 1 and hide it in other cases.

 

But it is working for both radiobuttons instead of one radiobutton.
 
Awaiting Response!
Thank you 
 
 
 
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...