Index: /changelog
===================================================================
--- /changelog	(revision 8386)
+++ /changelog	(revision 8387)
@@ -617,3 +617,4 @@
 - Bugfix: Alternative Produktansicht mit Produktkombinationen
 - Bugfix: PHP 8.2 Fehler bei Rechnungen ohne Farbe
+- Bugfix: wpsg_combination Klasse auch ohne Produktvarianten geladen
 - Feature: Suche nach Firmennamen beim Anlegen neuer Bestellungen
Index: /classes/wpsg_combination.class.php
===================================================================
--- /classes/wpsg_combination.class.php	(revision 8387)
+++ /classes/wpsg_combination.class.php	(revision 8387)
@@ -0,0 +1,168 @@
+<?php
+	
+	declare(strict_types=1);
+	
+	/**
+	 * @author: Daniel Schmitzer (daschmi@daschmi.de)
+	 * @date: 20.04.23
+	 * @time: 13:27
+	 */
+	
+	namespace wpsg;
+	
+	class wpsg_combination extends \wpsg_model {
+		
+		static $_tableName = 'WPSG_TBL_PRODUCTS_COMBINATION';
+		
+		/**
+		 * @throws Exception
+		 */
+		public function load($variant_id) {
+
+			parent::load($variant_id);
+
+			$this->data = $this->db->fetchRow("SELECT O.* FROM `".WPSG_TBL_PRODUCTS_COMBINATION."` AS O WHERE O.`id` = '".wpsg_q($variant_id)."' ");
+			$this->data['var_key'] = self::normalizeKey($this->data['var_key']);
+
+			if (($this->data['id']??0) != $variant_id) throw new \wpsg\Exception(wpsg_translate(__('Gesuchte ID:#1# Gefundene ID:#2#', 'wpsg'), $variant_id, $this->data['id']??0));
+
+			return true;
+
+		}
+		
+		public function getVariantUrl(): string {
+			
+			$product_url = $this->getProduct()->getProductURL();
+			
+			if (strpos($product_url, '?') === false) $product_url .= '?set_product_key=';
+			else $product_url .= '&set_product_key=';
+			
+			$product_url .= 'pv_'.$this->getProductId().'|'.$this->getVarKey();
+			
+			return $product_url;
+			
+		}
+		
+		public function getVarKey(): string {
+			
+			return $this->__get('var_key');
+			
+		}
+		
+		public function getProductId(): int {
+			
+			return intval($this->__get('product_id'));
+			
+		}
+		
+		public function getProduct(): \wpsg_product {
+			
+			return \wpsg_product::getInstance($this->getProductId());
+			
+		}
+		
+		public function toJSON(): array {
+			
+			$json = $this->data;
+			
+			$json['id'] = intval($json['id']);
+			$json['product_id'] = intval($json['product_id']);
+			$json['label'] = $this->getLabel();
+			$json['loaded'] = true;
+			$json['url'] = $this->getVariantUrl();
+			$json['anr'] = $this->getMeta('anr');
+			$json['name'] = $this->getMeta('name');
+			$json['detailname'] = $this->getMeta('detailname');
+			$json['arProductCodes'] = [];
+			
+			foreach (\wpsg_product::getProductCodeConfig() as $code_key => $code_data) {
+				
+				$product_code = $this->getMeta($code_key, false, '');
+				
+				$json['arProductCodes'][$code_key] = [
+					'label' => $code_data['label'],
+					'code_key' => $code_key,
+					'code' => trim($product_code),
+					'set' => trim($product_code) !== ''
+				];
+				
+			}
+			
+			return $json;
+			
+		}
+		
+		public function getLabel(): string {
+			
+			return self::getLabelFromKey($this->__get('var_key'));
+			
+		}
+		
+		/* static */
+		
+		public static function getLabelFromKey(string $var_key): string {
+			
+			$arKey = explode('|', self::normalizeKey($var_key));
+			$arLabel = [];
+			
+			foreach ($arKey as $var_vari) {
+				
+				list($var_id, $vari_id) = array_map('intval', explode(':', $var_vari));
+				
+				try { $var_label = \wpsg\wpsg_variant::getInstance($var_id)->getLabel(); } catch (\Exception $e) { }
+				try { $vari_label = \wpsg\wpsg_variation::getInstance($vari_id)->getLabel(); } catch (\Exception $e) { }
+				
+				$arLabel[] = $var_label.':'.$vari_label;
+				
+			}
+			
+			return implode(' / ', $arLabel);
+			
+		}
+		
+		public static function getByProductAndKey(int $product_id, string $var_key): wpsg_combination {
+			
+			$exist = self::findByProductAndKey($product_id, $var_key);
+
+			if ($exist !== null) return $exist;
+			
+			$combination_id = $GLOBALS['wpsg_db']->ImportQuery(WPSG_TBL_PRODUCTS_COMBINATION, [
+				'product_id' => intval($product_id),
+				'var_key' => wpsg_q(self::normalizeKey($var_key))
+			]);
+			
+			return wpsg_combination::getInstance($combination_id);
+			
+		}
+		
+		public static function findByProductAndKey(int $product_id, string $var_key): ?wpsg_combination {
+			
+			$var_key = self::normalizeKey($var_key);
+			
+			$component_id = intval($GLOBALS['wpsg_db']->fetchOnePrepared("SELECT `id` FROM `".WPSG_TBL_PRODUCTS_COMBINATION."` WHERE `product_id` = %d AND `var_key` = %s ", $product_id, self::normalizeKey($var_key)));
+			
+			if ($component_id > 0) return wpsg_combination::getInstance($component_id);
+			else return null;
+			
+		}
+		
+		/**
+		 * Sortieren, damit die Reihenfolge die eventuell anders sein kann angeglichen wird
+		 *
+		 * @param string $var_key
+		 * @return string
+		 */
+		public static function normalizeKey(string $var_key): string {
+			
+			if (substr($var_key, 0, 3) === 'pv_') $var_key = preg_replace('/^pv_\d+\|/', '', $var_key);
+		 
+			$arKeys = explode('|', $var_key);
+			
+			sort($arKeys);
+		
+			return implode('|', $arKeys);
+			
+		}
+		
+		
+	}
Index: /lib/wpsg_fpdf.class.php
===================================================================
--- /lib/wpsg_fpdf.class.php	(revision 8386)
+++ /lib/wpsg_fpdf.class.php	(revision 8387)
@@ -31,7 +31,7 @@
 			
 			// Hier kein toISO weil intern wieder Cell aufgerufen wird
-			parent::MultiCell($width, $h, $txt, $border, $align, $fill); 
-
-			$height = $this->getY() - $y;
+			parent::MultiCell($width, wpsg_tf($h), $txt, $border, $align, $fill);
+
+			$height = $this->getY() - wpsg_tf($y);
 				
 			return $height;
Index: ds/mod_productvariants/wpsg_combination.class.php
===================================================================
--- /mods/mod_productvariants/wpsg_combination.class.php	(revision 8386)
+++ 	(revision )
@@ -1,168 +1,0 @@
-<?php
-	
-	declare(strict_types=1);
-	
-	/**
-	 * @author: Daniel Schmitzer (daschmi@daschmi.de)
-	 * @date: 20.04.23
-	 * @time: 13:27
-	 */
-	
-	namespace wpsg;
-	
-	class wpsg_combination extends \wpsg_model {
-		
-		static $_tableName = 'WPSG_TBL_PRODUCTS_COMBINATION';
-		
-		/**
-		 * @throws Exception
-		 */
-		public function load($variant_id) {
-
-			parent::load($variant_id);
-
-			$this->data = $this->db->fetchRow("SELECT O.* FROM `".WPSG_TBL_PRODUCTS_COMBINATION."` AS O WHERE O.`id` = '".wpsg_q($variant_id)."' ");
-			$this->data['var_key'] = self::normalizeKey($this->data['var_key']);
-
-			if (($this->data['id']??0) != $variant_id) throw new \wpsg\Exception(wpsg_translate(__('Gesuchte ID:#1# Gefundene ID:#2#', 'wpsg'), $variant_id, $this->data['id']??0));
-
-			return true;
-
-		}
-		
-		public function getVariantUrl(): string {
-			
-			$product_url = $this->getProduct()->getProductURL();
-			
-			if (strpos($product_url, '?') === false) $product_url .= '?set_product_key=';
-			else $product_url .= '&set_product_key=';
-			
-			$product_url .= 'pv_'.$this->getProductId().'|'.$this->getVarKey();
-			
-			return $product_url;
-			
-		}
-		
-		public function getVarKey(): string {
-			
-			return $this->__get('var_key');
-			
-		}
-		
-		public function getProductId(): int {
-			
-			return intval($this->__get('product_id'));
-			
-		}
-		
-		public function getProduct(): \wpsg_product {
-			
-			return \wpsg_product::getInstance($this->getProductId());
-			
-		}
-		
-		public function toJSON(): array {
-			
-			$json = $this->data;
-			
-			$json['id'] = intval($json['id']);
-			$json['product_id'] = intval($json['product_id']);
-			$json['label'] = $this->getLabel();
-			$json['loaded'] = true;
-			$json['url'] = $this->getVariantUrl();
-			$json['anr'] = $this->getMeta('anr');
-			$json['name'] = $this->getMeta('name');
-			$json['detailname'] = $this->getMeta('detailname');
-			$json['arProductCodes'] = [];
-			
-			foreach (\wpsg_product::getProductCodeConfig() as $code_key => $code_data) {
-				
-				$product_code = $this->getMeta($code_key, false, '');
-				
-				$json['arProductCodes'][$code_key] = [
-					'label' => $code_data['label'],
-					'code_key' => $code_key,
-					'code' => trim($product_code),
-					'set' => trim($product_code) !== ''
-				];
-				
-			}
-			
-			return $json;
-			
-		}
-		
-		public function getLabel(): string {
-			
-			return self::getLabelFromKey($this->__get('var_key'));
-			
-		}
-		
-		/* static */
-		
-		public static function getLabelFromKey(string $var_key): string {
-			
-			$arKey = explode('|', self::normalizeKey($var_key));
-			$arLabel = [];
-			
-			foreach ($arKey as $var_vari) {
-				
-				list($var_id, $vari_id) = array_map('intval', explode(':', $var_vari));
-				
-				try { $var_label = \wpsg\wpsg_variant::getInstance($var_id)->getLabel(); } catch (\Exception $e) { }
-				try { $vari_label = \wpsg\wpsg_variation::getInstance($vari_id)->getLabel(); } catch (\Exception $e) { }
-				
-				$arLabel[] = $var_label.':'.$vari_label;
-				
-			}
-			
-			return implode(' / ', $arLabel);
-			
-		}
-		
-		public static function getByProductAndKey(int $product_id, string $var_key): wpsg_combination {
-			
-			$exist = self::findByProductAndKey($product_id, $var_key);
-
-			if ($exist !== null) return $exist;
-			
-			$combination_id = $GLOBALS['wpsg_db']->ImportQuery(WPSG_TBL_PRODUCTS_COMBINATION, [
-				'product_id' => intval($product_id),
-				'var_key' => wpsg_q(self::normalizeKey($var_key))
-			]);
-			
-			return wpsg_combination::getInstance($combination_id);
-			
-		}
-		
-		public static function findByProductAndKey(int $product_id, string $var_key): ?wpsg_combination {
-			
-			$var_key = self::normalizeKey($var_key);
-			
-			$component_id = intval($GLOBALS['wpsg_db']->fetchOnePrepared("SELECT `id` FROM `".WPSG_TBL_PRODUCTS_COMBINATION."` WHERE `product_id` = %d AND `var_key` = %s ", $product_id, self::normalizeKey($var_key)));
-			
-			if ($component_id > 0) return wpsg_combination::getInstance($component_id);
-			else return null;
-			
-		}
-		
-		/**
-		 * Sortieren, damit die Reihenfolge die eventuell anders sein kann angeglichen wird
-		 *
-		 * @param string $var_key
-		 * @return string
-		 */
-		public static function normalizeKey(string $var_key): string {
-			
-			if (substr($var_key, 0, 3) === 'pv_') $var_key = preg_replace('/^pv_\d+\|/', '', $var_key);
-		 
-			$arKeys = explode('|', $var_key);
-			
-			sort($arKeys);
-		
-			return implode('|', $arKeys);
-			
-		}
-		
-		
-	}
Index: /mods/wpsg_mod_productvariants.class.php
===================================================================
--- /mods/wpsg_mod_productvariants.class.php	(revision 8386)
+++ /mods/wpsg_mod_productvariants.class.php	(revision 8387)
@@ -30,5 +30,4 @@
 			require_once dirname(__FILE__).DIRECTORY_SEPARATOR.'mod_productvariants'.DIRECTORY_SEPARATOR.'wpsg_variant.class.php';
 			require_once dirname(__FILE__).DIRECTORY_SEPARATOR.'mod_productvariants'.DIRECTORY_SEPARATOR.'wpsg_variation.class.php';
-			require_once dirname(__FILE__).DIRECTORY_SEPARATOR.'mod_productvariants'.DIRECTORY_SEPARATOR.'wpsg_combination.class.php';
 			
 			self::$arTypeLabel = array(
