I have been try to make category method payment, for example : I have methods payment :

- Bank Transfer Virtual Account, Credit Card Payment
- Cash On Delivery, Credit Card Espay, Mandiri Internet Banking
- Bank Transfer Payment, Kredivo.

so I want to make category based on method type.

Credit Card: Credit Card Payment, Credit Card Espay, Kredivo

Bank Transfer: Mandiri Internet Banking,Bank Transfer Payment

<?php foreach ($methods as $_method):
    $_code = $_method->getCode(); ?>
    <!-- ini baru -->
    <dt id="dt_method_<?php echo $_code ?>">
        <?php if(!$oneMethod): ?>
            <?php if(($this->escapeHtml($_method->getTitle())=="Mandiri Internet Banking") || ($this->escapeHtml($_method->getTitle())=="Bank Transfer Payment")) :?>
            <input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="radio" name="payment[method]" title="<?php echo $this->escapeHtml($_method->getTitle()) ?>" onclick="payment.switchMethod('<?php echo $_code ?>')"<?php if($this->getSelectedMethodCode()==$_code): ?> checked="checked"<?php endif; ?> class="radio" />
            <?php endif; ?>
        <?php else: ?>
            <span class="no-display"><input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="radio" name="payment[method]" checked="checked" class="radio" /></span>
            <?php $oneMethod = $_code; ?>
        <?php endif; ?>
        <!-- update dwi -->
        <label for="p_method_<?php echo $_code ?>">
            <?php $gmbrpymnt = $this->escapeHtml($_method->getTitle());
            if ( $gmbrpymnt == "Indomaret") {
                echo "<img src='http://staging.idmarco.com/media/wysiwyg/logoindomaret.png' alt='Indomaret' class='v-midle'>"; 
            } else {
                echo $this->escapeHtml($this->getMethodTitle($_method));
            } ?> 
            <?php echo $this->getMethodLabelAfterHtml($_method) ?>
        <!-- sampe sini -->
    <?php if ($html = $this->getPaymentMethodFormHtml($_method)): ?>
        <!-- ini baru -->
        <dd id="dd_method_<?php echo $_code ?>">
            <?php echo $html; ?>
    <?php endif; ?>
<?php endforeach; ?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.