magento - How to make Installments on product page get Final or SpecialPrice instead of GrantTotal? -


maybe can me on one. want insert dropdown installments on product page, , must show price numbers 2 decimals, example: r$ 300,00 instead of r$ 300,0000. thank you! code have , tried modify no success:

    <?php     $standad = mage::getsingleton('moip/standard');     $api = mage::getsingleton('moip/api');     ?>       <link rel="stylesheet" type="text/css" href="<?php echo $this->getskinurl('o2ti_moip/css/formulario.css'); ?> "media="all">        <?php     $_product = $this->getproduct( );     $_corehelper = $this->helper('core');     ?>          <?php if ($standad->getconfigdata('parcelamento')): ?>         <label id="dadoscartaoopc">parcelamento no cartão de crédito:</label>         <select name="payment[credito_parcelamento]" id="credito_parcelamentoproduto" >                             <?php                                 $parcelamento = $api->getparcelamento($_product->getfinalprice());                                  foreach ($parcelamento $k => $v): ?>                                     <option value="<?php echo $k ?>"><?php echo $k . "x r$ " . $v['valor'] . " | total: r$ " .$v['total']."" ?></option>                              <?php endforeach; ?>                                 </select>         <?php endif; ?>         <div id="addparcelas">                                         <?php                                         $standard = mage::getsingleton('moip/standard');                                         $parcelamento = $standard->getinfoparcelamento();                                         if ($parcelamento['juros1'] == 0)                                         {                                         echo "<div id=\"addparcelasdesc\"> sem juros até ".$parcelamento['ate1']." parcelas,</div>";                                         if ($parcelamento['ate1'] < 13)                                         {                                         echo "após juros de 1,99% ao mês.";                                         }                                         }                                         if ($parcelamento['juros1'] >= "1.99")                                         {                                         echo "com juros de ".$parcelamento['juros1']." ao mês.";                                         }                                         ?>                                      </div>  

printscreen of actual dropdown: http://postimg.org/image/pokqf6xxj/03a4fda4/

solution:

     <?php     $standad = mage::getsingleton('moip/standard');     $api = mage::getsingleton('moip/api');     ?>       <link rel="stylesheet" type="text/css" href="<?php echo $this->getskinurl('o2ti_moip/css/formulario.css'); ?> "media="all">        <?php     $_product = $this->getproduct( );     $_corehelper = $this->helper('core');     ?>          <?php if ($standad->getconfigdata('parcelamento')): ?>         <label id="parcelamentoproduto">parcelamento no cartÃo de crÉdito:</label>         <select name="payment[credito_parcelamento]" id="credito_parcelamentoproduto" >                             <?php                                 $parcelamento = $api->getparcelamento($_product->getfinalprice());                                  foreach ($parcelamento $k => $v): ?>                                     <option value="<?php echo $k ?>"><?php echo $k . "x r$ " . number_format($v['valor'],2,',',' ') . " ---------- total: r$ " .number_format($v['total'],2,',',' ')."" ?></option>                              <?php endforeach; ?>                                 </select>         <?php endif; ?>         <div id="addparcelas">                                         <?php                                         $standard = mage::getsingleton('moip/standard');                                         $parcelamento = $standard->getinfoparcelamento();                                         if ($parcelamento['juros1'] == 0)                                         {                                         echo "<div id=\"addparcelasdesc\"> sem juros até ".$parcelamento['ate1']." parcelas,</div>";                                         if ($parcelamento['ate1'] < 13)                                         {                                         echo "após juros de 1,99% ao mês.";                                         }                                         }                                         if ($parcelamento['juros1'] >= "1.99")                                         {                                         echo "com juros de ".$parcelamento['juros1']." ao mês.";                                         }                                         ?>                                      </div> 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -