Index: www-lp/www/checkout_process.php =================================================================== diff -u -r4 -r37 --- www-lp/www/checkout_process.php (.../checkout_process.php) (revision 4) +++ www-lp/www/checkout_process.php (.../checkout_process.php) (revision 37) @@ -207,7 +207,7 @@ } if ($stock_left <= $stock_level ) { // find the products category - $category_query = tep_db_query("select categories_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)($order->products[i]['id']) . "'"); + $category_query = tep_db_query("select categories_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)($order->products[$i]['id']) . "'"); $category = tep_db_fetch_array($category_query); $p_category = $category["categories_id"]; $email_subject = sprintf(EMAIL_STOCK_SUBJECT, $stock_left, html_entity_decode($order->products[$i]['name'])); @@ -219,10 +219,30 @@ // Update products_ordered (for bestsellers list) tep_db_query("update " . TABLE_PRODUCTS . " set products_ordered = products_ordered + " . sprintf('%d', $order->products[$i]['qty']) . " where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'"); +// 2025-01-14 : Get price special + + // Pas d'affichage de % de remise pour le moment + $result_percentage_reduce = ""; + if (LPOSC_SALES_ENABLED == "True"){ + $special_price = tep_get_products_special_price(tep_get_prid($order->products[$i]['id'])); + if ( $special_price ) + $product_price = tep_get_products_price(tep_get_prid($order->products[$i]['id'])); + if ( $special_price ) + { + $percentage_reduce = tep_get_sales_percentage($product_price, + $special_price); + $result_percentage_reduce = ' (- ' . $percentage_reduce .')'; + } + + } + +// 2025-01-14 + + $sql_data_array = array('orders_id' => $insert_id, 'products_id' => tep_get_prid($order->products[$i]['id']), 'products_model' => $order->products[$i]['model'], - 'products_name' => $order->products[$i]['name'], + 'products_name' => $order->products[$i]['name'], //. $result_percentage_reduce, // sales % not added to invoice (not wished by customer) 'products_price' => $order->products[$i]['price'], // -> MARP256 'products_cost' => $order->products[$i]['cost'],