#1999 closed Bug/Fehler (fixed)
nicht verwendete Felder in DB-Tabelle orders_products
Reported by: | noRiddle | Owned by: | somebody |
---|---|---|---|
Priority: | hoch | Milestone: | modified-shop-2.0.6.0 |
Component: | Shop | Version: | 2.0.5.1 |
Description
Es gibt zwei Felder in der DB-Tabelle orders_products die nicht verwendet oder nicht gefüllt werden.
- products_price_origin
- products_weight
- Erstgenanntes wird in der /checkout_process.php mit $order->products[$i]['price_origin'] gefüllt, den Wert gibt es jedoch gar nicht.
- Zweitgenanntes wird gar nicht gefüllt.
Da man das Feld jedoch evtl. für irgendetwas brauchen könnte und es schonmal da ist sollte es in der /checkout_process.php mit $order->products[$i]['final_weight'] gefüllt werden.
Diesen Fix könnte man noch in das nächste Release aufnehmen, da lediglich eine Datei und dort zwei Zeilen bearbeitet werden müssten. Deshalb habe ich die Priorität auf "hoch" gesetzt.
/checkout_process.php:
anstatt
$sql_data_array = array ( 'orders_id' => $insert_id, 'products_id' => xtc_get_prid($order->products[$i]['id']), 'products_model' => $order->products[$i]['model'], 'products_name' => $order->products[$i]['name'], 'products_ean' => $order->products[$i]['ean'], 'products_shipping_time' => strip_tags($order->products[$i]['shipping_time']), 'products_price_origin' => $order->products[$i]['price_origin'], 'products_price' => $order->products[$i]['price'], 'final_price' => $order->products[$i]['final_price'], 'products_tax' => $order->products[$i]['tax'], 'products_discount_made' => $order->products[$i]['discount_allowed'], 'products_quantity' => $order->products[$i]['qty'], 'allow_tax' => $_SESSION['customers_status']['customers_status_show_price_tax'], 'products_order_description' => $order->products[$i]['order_description'], );
das (products_price_origin entfernt, products_weight hinzugefügt)
$sql_data_array = array ( 'orders_id' => $insert_id, 'products_id' => xtc_get_prid($order->products[$i]['id']), 'products_model' => $order->products[$i]['model'], 'products_name' => $order->products[$i]['name'], 'products_ean' => $order->products[$i]['ean'], 'products_shipping_time' => strip_tags($order->products[$i]['shipping_time']), 'products_price' => $order->products[$i]['price'], 'final_price' => $order->products[$i]['final_price'], 'products_tax' => $order->products[$i]['tax'], 'products_discount_made' => $order->products[$i]['discount_allowed'], 'products_quantity' => $order->products[$i]['qty'], 'allow_tax' => $_SESSION['customers_status']['customers_status_show_price_tax'], 'products_order_description' => $order->products[$i]['order_description'], 'products_weight' => $order->products[$i]['final_weight']) );
Gruß,
noRiddle
Attachments (0)
Change History (4)
comment:1 Changed 6 weeks ago by Tomcraft
- Milestone set to modified-shop-2.0.6.0
comment:2 Changed 5 weeks ago by GTB
comment:3 Changed 5 weeks ago by GTB
- Resolution set to fixed
- Status changed from new to closed
In 13470:
comment:4 Changed 5 weeks ago by anonymous
Ich hatte mir natürlich die Methode get_products() angeschaut, anscheinend aber mit Blindheit geschlagen... :hust:.
Ob final_weight oder weight ist Ansichtssache, es gibt ja auch einen final_price der die Stückzahl mitbeachtet. Aber egal, Hauptsache man weiß was erfasst wird.
Gruß,
noRiddle
Klar wird products_price_origin gesetzt.
Schau dir mal die Methode get_products in der ShoppingCart? Klasse an ;)
products_weight schaue ich mir an. Aber wenn muss hier das Einzelgewicht rein, nicht das Gesamtgewicht.