Antwort #48 am: 07. August 2012, 20:42:52
suche im Code folgende Stelle und füge den mit //ca gekennzeichneten bereich ein.
Hallo cannewitz und alle anderen,
besten Dank für Eure Hilfe.
Hat mich doch einen ganzen Schritt weitergebracht. Allerdings habe ich teilweise Kurzbeschreibungen und teilweise keine. Wenn keine Kurzbeschreibungen vorhanden sind, soll der Anfangstext aus der Beschreibung angezeigt werden. Und bei manchen Kurzbeschreibungen gibt es am Anfang kleine Grafiken, die ich auf der Bestellseite nicht anzeigen wollte. Dann hat es mir auch ich glaube die Attribute links unter das Foto geschoben. Auch wollte ich die Versandhinweise nicht in einem separaten Feld haben. Ich habe jetzt ohne Programmierkenntnisse Code aus verschiedenen Anleitungen zusammengeschnippelt.
Was mir jetzt noch nicht gefällt:
- Der html-Code entschlackt auch <br /> in der Beschreibung und die Wörter werden dann zusammengerückt. Wie kann man noch einen Befehl einbauen der <br /> durch ein Leerzeichen ersetzt?
- Bei den Kurzbeschreibungen wird die dem Text vorangestellte Grafik entschlackt, gleichzeitig rückt der Text aber auch ein. Was kann ich da noch einbauen, dass der Text in solchen Fällen nicht eingerückt wird?
Ansonsten bin ich jetzt zufrieden. Eine Grafik habe ich mal angehängt. Genauso den von mir zusammengeflickten $data_products Code.
Danke nochmals.
Roland
$data_products = "\n".' <table width="100%" border="0" cellspacing="0" cellpadding="0">';// products table header TRif (file_exists(DIR_WS_LANGUAGES
.$_SESSION['language'].'/checkout_confirmation.php')) { $data_products.= "\n". ' <tr>'."\n". ' <td class="main_header" align="left" valign="top"><b>'.HEADER_QTY
.'</b></td>'."\n". ' <td class="main_header" align="left" valign="top" colspan="2"><b>'.HEADER_ARTICLE
.'</b></td>'."\n". ' <td class="main_header" align="right" valign="top"><b>'.HEADER_SINGLE
.'</b></td>'."\n". ' <td class="main_header" align="right" valign="top"><b>'.HEADER_TOTAL
.'</b></td>'."\n". ' </tr>';}// products TR for each product in cartfor ($i = 0, $n = sizeof($order->products); $i < $n; $i++) { $data_products .= "\n". ' <tr>'."\n". ' <td class="main_row" align="left" valign="top">'.$order->products[$i]['qty'].' x</td>'."\n". ' <td class="main_row" align="left" valign="top" width="90"><img src=" '.DIR_WS_THUMBNAIL_IMAGES
.xtc_get_products_image
($order->products[$i]['id']).' "width="100px" /></td>'."\n". ' <td class="main_row" align="left" valign="top">'.$order->products[$i]['name']; // selected attributes for each product if ((isset ($order->products[$i]['attributes'])) && (sizeof($order->products[$i]['attributes']) > 0)) { for ($j = 0, $n2 = sizeof($order->products[$i]['attributes']); $j < $n2; $j++) { $data_products .= "\n". ' <br /><br />'."\n". ' <nobr><small><i> - '.$order->products[$i]['attributes'][$j]['option'].': '.$order->products[$i]['attributes'][$j]['value'].'</i></small></nobr>'; } }//ca $data_products .= "\n". ' <br /><br />'."\n". '<small>'; if (!empty($order->products[$i]['short_description'])) { $data_products .=trim(strip_tags($order->products[$i]['short_description'])); } else { $data_products .=trim(substr(strip_tags($order->products[$i]['description']),0,300)); if (strlen(strip_tags($order->products[$i]['description'])) > 300) $data_products.=' [...]';} '</small>';//ca// shipping information for each product if (ACTIVATE_SHIPPING_STATUS
== true) { $data_products .= "\n". ' <br /><br />'."\n". ' <nobr><small>'.SHIPPING_TIME
.$order->products[$i]['shipping_time'].'</small></nobr>'; } $data_products .= '</td>'."\n". ' <td class="main_row" align="right" valign="top">'.$xtPrice->xtcFormat($order->products[$i]['price'], true).'</td>'."\n". ' <td class="main_row" align="right" valign="top">'.$xtPrice->xtcFormat($order->products[$i]['final_price'], true).'</td>'."\n". ' </tr>'; // tax TR if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0 && $_SESSION['customers_status']['customers_status_add_tax_ot'] == 1) { if (sizeof($order->info['tax_groups']) > 1) $data_products .= "\n". ' <tr>'."\n". ' <td class="main" valign="top" align="right">'.xtc_display_tax_value
($order->products[$i]['tax']).'%</td>'."\n". ' </tr>'; } $data_products .= "\n";}$data_products .= ' </table>';