nada igual sigue la falla me gustaria saber si con switch case no habria problemas y si se puede ahcer
Cita:
Iniciado por Marvin
Lo que tienes ahi es lo mismo que hacer esto:
Código PHP:
if($this->weight >=1 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 >=1 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!
![de acuerdo](http://static.forosdelweb.com/fdwtheme/images/smilies/dedosarriba.png)