Skip to content

Instantly share code, notes, and snippets.

Created November 14, 2012 15:41
Show Gist options
  • Save anonymous/4072846 to your computer and use it in GitHub Desktop.
Save anonymous/4072846 to your computer and use it in GitHub Desktop.
<?php foreach($this->getParcelas() as $parcela): ?>
<?php
if( $parcela['parcela'] <= 2 ){
?>
<label style="clear: both !important; padding: 0px !important"><input style="width: 20px !important" type="radio" id="cielo_cc_parcelas_<?php echo $parcela['parcela']; ?>" name="payment[cc_parcelas]" class="validate-one-required-by-name" value="<?php echo $parcela['parcela']; ?>"><strong><?php echo $parcela['label']; ?></strong> <em><?php if( $parcela['parcela'] != 1 ): echo "(Sem juros)"; endif; ?></em> </label><br />
<?php
}
if( $parcela['parcela'] == 3 && $total > 70 || $parcela['parcela'] == 3 && $total < 150 && $total > 70 ){
?>
<label style="clear: both !important; padding: 0px !important"><input style="width: 20px !important" type="radio" id="cielo_cc_parcelas_<?php echo $parcela['parcela']; ?>" name="payment[cc_parcelas]" class="validate-one-required-by-name" value="<?php echo $parcela['parcela']; ?>"><strong><?php echo $parcela['label']; ?></strong> <em>(Sem juros)</em> </label><br />
<?php
}
if( $parcela['parcela'] == 4 && $total > 150 || $parcela['parcela'] == 4 && $total < 300 && $total > 150 ){
?>
<label style="clear: both !important; padding: 0px !important"><input style="width: 20px !important" type="radio" id="cielo_cc_parcelas_<?php echo $parcela['parcela']; ?>" name="payment[cc_parcelas]" class="validate-one-required-by-name" value="<?php echo $parcela['parcela']; ?>"><strong><?php echo $parcela['label']; ?></strong> <em>(Sem juros)</em> </label><br />
<?php
}
if( $parcela['parcela'] > 6 && $total > 300 ){
?>
<label style="clear: both !important; padding: 0px !important"><input style="width: 20px !important" type="radio" id="cielo_cc_parcelas_<?php echo $parcela['parcela']; ?>" name="payment[cc_parcelas]" class="validate-one-required-by-name" value="<?php echo $parcela['parcela']; ?>"><strong><?php echo $parcela['label']; ?></strong> <em>(Sem juros)</em> </label><br />
<?php
}
?>
<?php endforeach ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment