Welcome Guest, Not a member yet? Register   Sign In
Getting php error on production but not development
#3

[eluser]Cgull[/eluser]
I am posting the code of the function that it looks like it is moaning about:
Code:
function calcDelivery()
{
  $this->load->helper('form');
  $this->load->model('order/checkout_model');
  $totalWeight = 0;
  
  foreach($this->cart->contents() as $items):
   $qty = $items['qty'];
   foreach ($this->cart->product_options($items['rowid']) as $option_name => $option_value):
    if($option_name == 'weight'):
     if($option_value == '250g')
      $option_value = 0.25;
     else
      $option_value = 1;
    endif;
     $totalWeight += floatval($option_value) * $qty;
   endforeach;
  endforeach;
  if($totalWeight < 1)
   $totalWeight = 1;
  else
   $totalWeight = ceil($totalWeight);
  $delivery = $this->checkout_model->calcDelivery($totalWeight);
  $deliveryTotal = floatval($delivery);//round(floatval($totalWeight), PHP_ROUND_HALF_UP);
  
  $subtotal = $this->cart->format_number($this->cart->total());
  $total = $subtotal + $deliveryTotal;
  echo "R ";
  printf("%.2f", "$deliveryTotal");
  echo '&lt;input type="hidden" name="total" value="' . $total  . '" id="totalval" /&gt;';
  $this->session->set_userdata('deliveryVal', $deliveryTotal);
  $this->session->set_userdata('total', $total);
}

Line 203 is this one:
Code:
echo "R ";

Thank you


Messages In This Thread
Getting php error on production but not development - by El Forum - 06-08-2012, 11:47 PM
Getting php error on production but not development - by El Forum - 06-09-2012, 12:38 AM
Getting php error on production but not development - by El Forum - 06-09-2012, 01:32 AM
Getting php error on production but not development - by El Forum - 06-09-2012, 02:13 AM
Getting php error on production but not development - by El Forum - 06-09-2012, 02:17 AM
Getting php error on production but not development - by El Forum - 06-09-2012, 04:06 AM
Getting php error on production but not development - by El Forum - 06-09-2012, 04:10 AM
Getting php error on production but not development - by El Forum - 06-09-2012, 09:15 AM



Theme © iAndrew 2016 - Forum software by © MyBB