Bläddra i källkod

Fix adding a product with missing price

Johannes Zellner 5 år sedan
förälder
incheckning
c51f3c8dba
1 ändrade filer med 2 tillägg och 0 borttagningar
  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);