Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2009
    Location
    New Zealand
    Posts
    54
    Plugin Contributions
    0

    Default Swipe HQ payment module - Order confirmation E-mail

    Hi,

    I am using the Swipe HQ payment module, I also have quantity discounts installed. For some reason on the order confirmation e-mail the
    discount gets taken of the total twice - it doesn't do this anywhere else, just on the confirmation e-mail and only when using the swipeHQ payment module.

    Below is the code I believe to be responsible for sending the order confirmation e-mail from the swipehq module:

    //send emails
    if (!empty($_REQUEST['user_data'])) {
    $order_id = $_REQUEST['user_data'];
    if (!empty($_SESSION['swipehq_order_' . $order_id])) {
    require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));
    require_once('includes/languages/english/checkout_process.php');

    require_once(DIR_WS_CLASSES . 'order.php');
    require_once(DIR_WS_CLASSES . 'payment.php');
    $payment_class = new payment($_SESSION['payment']);
    $order = unserialize($_SESSION['swipehq_order_' . $order_id]);

    require_once(DIR_WS_CLASSES . 'order_total.php');
    $order_total_modules = new order_total;
    $order_totals = $order_total_modules->process();
    $order->send_order_email($order_id, 2);

    $zco_notifier->notify('NOTIFY_CHECKOUT_PROCESS_AFTER_SEND_ORDER_EMAIL');
    }

    }

    I have e-mailed swipe HQ re this, but as it may have something to do with having the quantity discount mod installed thought I would ask about it here also.

    Thanks,

    Mike.

  2. #2
    Join Date
    Mar 2009
    Location
    New Zealand
    Posts
    54
    Plugin Contributions
    0

    Default Re: Swipe HQ payment module - Order confirmation E-mail

    Hi,

    I have tried a few things now - but really have no clue, as each change I have made breaks the code.

    All I can gather is that this section of code:

    require_once(DIR_WS_CLASSES . 'order_total.php');
    $order_total_modules = new order_total;
    $order_totals = $order_total_modules->process();
    $order->send_order_email($order_id, 2);

    is causing zencart to take the discount of the total twice.

    Below is what the confirmation e-mail looks like:

    Sub-Total: $135.60
    Fastways Courier (Delivery to 2110 - Please allow 2-3 working days for delivery once payment has been confirmed1 box(es) 1.16kg(s)): $4.50 Quantity Discount: -$6.78
    GST: $16.52
    Total: $126.54 (This should be $133.32, but instead of the correct discount of 6.78 being applied, 13.56 is being taken of the total)


    Any ideas would be most appreciated.

    Thanks,

    Mike

 

 

Similar Threads

  1. Replies: 2
    Last Post: 30 Sep 2009, 07:29 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR