Serstr Posted June 1, 2011 Report Share Posted June 1, 2011 Hallo, ich habe schon zahlreiche Threads gefunden, auch in diesem Forum, die sich mit dem Thema Produktbeschreibung in der Rechnung beschäftigt haben. Leider blieben alle ohne Antwort :/ Und zwar ist es so, dass ich unter dem Produkt gerne die Produktbeschreibung auf der Rechnung hätte, und zwar in der print_order.php-Datei! Dazu öffne ich die module/print_order.html-Datei und gehe zur Zeile <td style="border-right: 2px solid; border-bottom: 2px solid; border-color: #ffffff;"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>{$order_values.PRODUCTS_NAME}</strong> Hier würde ich gerne mit {$order_values.PRODUCTS_DESCRIPTION} die Produktbeschreibung einfügen... anscheinend enthält $order_values aber nicht die Produktbeschreibung... wo kann ich diese also einfügen? Dieses System übersteigt leider meine PHP-Kenntnisse... lg Serstr Link to comment Share on other sites More sharing options...
Serstr Posted July 7, 2011 Author Report Share Posted July 7, 2011 Habe es herausgefunden! Falls es noch jemanden interessieren sollte: includes/classes/order.php bearbeiten Zeile 152 (bei mir) $orders_products_query = xtc_db_query("SELECT * FROM " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . xtc_db_input($order_id) . "'"); umwandeln in $orders_products_query = xtc_db_query("SELECT orders_products.orders_products_id, orders_products.orders_id, orders_products.products_id, orders_products.products_model, orders_products.products_name, orders_products.products_price, orders_products.products_discount_made, orders_products.products_shipping_time, orders_products.final_price, orders_products.products_tax, orders_products.products_quantity, orders_products.allow_tax, products_description.products_description FROM orders_products INNER JOIN products_description ON orders_products.products_id = products_description.products_id WHERE orders_id = '" . xtc_db_input($order_id) . "' ORDER BY products_id"); Dann ca. bei Zeile 160 in den Array einfügen 'description' => $orders_products['products_description'], und ca. bei Zeile 190 den $order_query aktualisieren $order_query = "SELECT orders_products.products_id, orders_products.orders_products_id, orders_products.products_model, orders_products.products_name, orders_products.final_price, orders_products.products_shipping_time, orders_products.products_quantity, products_description.products_description FROM orders_products INNER JOIN products_description ON orders_products.products_id = products_description.products_id WHERE orders_id='".(int) $oID."'"; Schlussendlich noch ca. Zeile 219 $order_data verändern in $order_data[] = array ('PRODUCTS_MODEL' => $order_data_values['products_model'], 'PRODUCTS_NAME' => $order_data_values['products_name'], 'PRODUCTS_DESCRIPTION' => $order_data_values['products_description'], 'PRODUCTS_SHIPPING_TIME' => $order_data_values['products_shipping_time'], 'PRODUCTS_ATTRIBUTES' => $attributes_data, 'PRODUCTS_ATTRIBUTES_MODEL' => $attributes_model, 'PRODUCTS_PRICE' => $xtPrice->xtcFormat($order_data_values['final_price'], true),'PRODUCTS_SINGLE_PRICE' => $xtPrice->xtcFormat($order_data_values['final_price']/$order_data_values['products_quantity'], true), 'PRODUCTS_QTY' => $order_data_values['products_quantity']); Dann in templates/xtc4/module/print_order.html einfach {$order_values.PRODUCTS_DESCRIPTION} an einer beliebigen Stelle einfügen! Funktioniert einwandfrei bei mir! lg Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.