Jump to content
Latest News: (loading..)


  • Content count

  • Joined

  • Last visited

Profile Information

  • Real Name
    Peter Eslund
  1. NEW! Complete Order Editing Tool!

    I´ve used the order editor for a while for one of my customers.. There are a bunch of bugs in there, that would be nice if they where corrected: Scenario: In Sweden we use Postförskott (COD) and invoicing (Epay, Klarna). Both of these have additional fees added to them. These fees are subject to VAT. COD is only applicable when using mail as shipping alternative, and is entered as payment option. I´ve found the following bugs (in no specific order) 1. Changing payment method only update TABLE_ORDER, not TABLE_ORDER_TOTALS. Thereby swithing from e.g COD to invoice, will not show the correct order_total. Neither will it change the item in order_total. Reload_totals is never triggerd anywhere... As showin in edit_order_ajax.php: if ($action == 'update_order_field') { tep_db_query("UPDATE " . TABLE_ORDERS . " SET " . $_GET['field'] . " = '" . oe_iconv($_GET['new_value']) . "' WHERE orders_id = '" . $_GET['oID'] . "'"); //generate responseText echo $_GET['field']; } 2. Adding a product will not update order_total to include fees for additional ot_* modules. Order_total is only updated when deleting a product. 3. Using e.g. COD, order editor will not include the COD nor the VAT in the total vat. Fixing it was to add a "dirty" hack in order_total_ajax.php around line 350: if ($total_details['class'] == 'ot_fixed_payment_chg') { $pfavgift = $total_details['value']; if ($order_totals[$i]['code'] == 'ot_total'){ $order->info['total'] += ($pfavgift); } } Anyone that knows how to fix this properly? Cheers, //Peter