/** * Function to delete product(s) $d['product_id'] from the product table * * @param array $d The input vars * @return boolean True, when the product was deleted, false when not */ function delete(&$d) { $product_id = $d["product_id"]; if( is_array( $product_id)) { foreach( $product_id as $product) { if( !$this->delete_product( $product, $d )) return false; } return true; } else { return $this->delete_product( $product_id, $d ); } }