Ich versuche die Artikelattribute besser darzustellen, da meine Texte hier sehr lang / breit sind und die Rechnung unübersichtlich wird. Ziel: Ich möchte bei den Attributen einige Spalten MERGEN (verbinden) und nicht 10spaltig so wie im übrigen Layout der Rechnung bspw. Die Datei: admin/includes/gm/classes/gmOrderPDF.php Betroffener Code-Abschnitt ca. line 500 Code: foreach($product['PRODUCTS_ATTRIBUTES'] as $attribute) { $y = $this->getCells($attribute[0], '*** '. $attribute[1], '', '', '', '', '', $this->pdf_fonts_size, '', $y); } Hier sieht man die Platzhalter für die leeren Spalten nacht $attribute[1]. Wie kann ich hier diese verbinden? Danke.
habs gelöst, hab eine neue Methode angelegt und die spalten um 2 reduziert. Code: function getCellsAttribute($cell_1, $cell_2, $cell_5, $cell_6, $font_style = '', $font_size = '', $border = '', $y) { if($this->pdf_use_products_model) { $get_y = $this->getActualY($y); parent::SetY($y); parent::SetX(parent::getLeftMargin()); $this->AutoPageBreak = false; parent::MultiCell($this->pdf_order_data_cell_width[0], parent::getCellHeight(), $cell_1, $border, 'L', 0); $this->AutoPageBreak = true; } $get_y = $this->getActualY($get_y); parent::SetY($y); parent::SetX(parent::getLeftMargin() + $this->pdf_order_data_cell_width[0]); parent::MultiCell(0, parent::getCellHeight(), $cell_2, $border, 'L', 0); $get_y = $this->getActualY($get_y); return $get_y; } betroffener Code Bereich: Code: if(!empty($product['PRODUCTS_ATTRIBUTES'])) { //get new cells layout // -> font face/style/size/color parent::getFont($this->pdf_fonts['FOOTER']); //adding extra lines under product name parent::Ln(2); $y = $y + 2; foreach($product['PRODUCTS_ATTRIBUTES'] as $attribute) { //merged cells $y = $this->getCellsAttribute($attribute[0], '*** '. $attribute[1], '', '', '', $this->pdf_fonts_size, '', $y); //original code //$y = $this->getCells($attribute[0], '*** '. $attribute[1], '', '', '', '', '', $this->pdf_fonts_size, '', $y); } //adding extra lines under attributes parent::Ln(2); $y = $y + 2; }