Enabling module, fee is added to every order ever created (of type)

Created on 16 July 2012, almost 12 years ago
Updated 19 January 2024, 5 months ago

Enabling module and setting fee for payment method adds fee to all orders ever created of that type. This is extremely bad as old orders have wrong data (Fee that didnt exist or did exist but was different) It also makes all ubercart generated reports false.

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇫🇮Finland Demoshane

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • 🇺🇸United States mr_byte

    Many Years Later...

    In function uc_pma_adjustment_callback($op, &$order), add before the switch($op)

    $path = current_path();
    if (strstr($path, $order->order_id)) return;

    I'm getting the path, and if the order id in part of the path (ie: viewing/managing/editing order) then we really don't need to calculate an adjustment.

    There may be a better way to do this, and this might not work for everyone, hell it might not really work for me, I'm still beating this thing to make it store actual line items in uc_order_line_items. I noticed that what is intended to run under hook_order never does. I may or may not add a bug for that specifically, but by changing function uc_pma_order to uc_pma_uc_order, that function now runs as I suspect was intended. Artifact from porting to Drupal 7/UC3?

Production build 0.69.0 2024