order_ORIGIN overload is used!

This sample overload will modify the first order item and order total of every new order.

'; } /** * Overloaded "getOrderData" method. * * This method will change the first order item by setting a new product model name and product price. * * @param int $orderId * * @return array */ public function getOrderData($orderId) { $orderData = parent::getOrderData($orderId); $orderData[0]['PRODUCTS_MODEL'] = 'overload_example_order product model'; $orderData[0]['PRODUCTS_PRICE'] = '1.000.000,00 EUR'; $orderData[0]['PRODUCTS_SINGLE_PRICE'] = '12345,00 EUR'; return $orderData; } /** * Overloaded "getTotalData" method. * * This method will change the last order total (which is usually the sum value) by setting a random * sum value for the order. * * This sample manipulate the last total item (which is usually the sum value) and sets a random value. * * @param int $orderId * * @return array */ public function getTotalData($orderId) { $orderTotalData = parent::getTotalData($orderId); $randomValue = (float)(mt_rand(1, 100) . '.' . mt_rand(0, 99)); $orderTotalData['data'][count($orderTotalData['data']) - 1]['TEXT'] = '' . $randomValue . ' EUR'; $orderTotalData['total'] = $randomValue; return $orderTotalData; } }