Simple PHP Code for Magento

  • Posted:
  • Proposals: 2
  • Remote
  • #236226
  • Awarded
Jose Luis M.
Akash P. have already sent a proposal.
  • 0

Description

Experience Level: Entry
Hello,

I need a simple job to be done in php for a magento website.

I need that you transform this first code with the features in the layout of the second code.

<?php
function getNumParcelas($total, $maxParcelas, $valor_minimo)
{
$nParcelas = $maxParcelas;

//verifica o valor mínimo permitido para cada parcela
if (!empty($valor_minimo) && is_numeric($valor_minimo)) {
$parcPossiveis = floor($total / $valor_minimo);

if ($parcPossiveis < $nParcelas) {
$nParcelas = $parcPossiveis;
}
}

return $nParcelas;
}
function getValorParcela($total, $parcela, $taxa) {
if(!is_numeric($total) || $total <= 0){
return(false);
}
if((int)$parcela != $parcela){
return(false);
}
if(!is_numeric($taxa) || $taxa 1){
for($i=1; $i





getFinalPrice();
$numParcelas = getNumParcelas($capital, $maxParcelas, $valorMinimo);
for($i=1; $i < $numParcelas; $i++){
$valorParcela = getValorParcela($capital, $i+1, $taxa);

echo($i % 2 ? '' : '');
echo(''.($i+1).' parcelas de R$ '.number_format($valorParcela,2,',','.').'*&nbsp;');
echo($i % 2 ? '' : '


-------------

Second: Code

getId() );
$vezes = '10';
echo 'getFinalPrice()/$vezes, true, false ).'

---------------

I need that the first php code shows in the frontpage like:

Em até 10x Sem Juros de R$53,00 (with features from the first code, like $valorMinimo = 10;

and not like this

2 parcelas de R$ 265,00* 3 parcelas de R$ 176,67*
4 parcelas de R$ 132,50* 5 parcelas de R$ 106,00*
6 parcelas de R$ 88,33*

I hope you can do the job.

Thanks!

New Proposal

Create an account now and send a proposal now to get this project.

Sign up

Clarification Board Ask a Question

    There are no clarification messages.