Ver Mensaje Individual
  #3 (permalink)  
Antiguo 11/09/2008, 11:06
sopaetonto
(Desactivado)
 
Fecha de Ingreso: mayo-2008
Mensajes: 67
Antigüedad: 16 años
Puntos: 0
Respuesta: Problema con this y con condicionales

nada igual sigue la falla me gustaria saber si con switch case no habria problemas y si se puede ahcer

Cita:
Iniciado por Marvin Ver Mensaje
Lo que tienes ahi es lo mismo que hacer esto:
Código PHP:
if($this->weight >=and $this->weight <=40 ){
    
$this->total += zen_add_tax($products_price$products_tax) * $qty;
}else 
    if(
$this->weight >=41 and $this->weight <=120 ){
        
$this->total += zen_add_tax($products_price_w$products_tax) * $qty;
    } 
Por lo tanto podrias ponerlo asi:
Código PHP:
if($this->weight >=and $this->weight <=40 ){
    
$this->total += zen_add_tax($products_price$products_tax) * $qty;
}elseif(
$this->weight >=41 and $this->weight <=120 ){
    
$this->total += zen_add_tax($products_price_w$products_tax) * $qty;

Suerte!