Explorar el Código

Fix adding a product with missing price

Johannes Zellner hace 5 años
padre
commit
c51f3c8dba
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      website/DataBase/Price.php

+ 2 - 0
website/DataBase/Price.php

@@ -21,6 +21,8 @@ class Price
 
 	function create($priceset_id, $product_id, $price)
 	{
+		if (!$price) $price = 0;
+
 		$query = "INSERT INTO ".$this->db->price_table." VALUES(0, ".$priceset_id.", '".$product_id."', ".$price.")";
 
 		$this->db->query($query);