Results 1 to 9 of 9
  1. #1
    Join Date
    Nov 2005
    Posts
    53
    Plugin Contributions
    0

    Idea or Suggestion transaction details showing in note field?

    on packing slips for orders paid by PP express, the paypal transaction details (total, order ID#, etc) are showing up in the 'note' field.

    this makes it hard to find actual notes that customers leave about their orders.

    the info does not show up for paypal IPN orders. (yes i have both modules turned on. i wanted to offer the greater speed for paypal users, but didn't want to lose the ability to sell to people without paypal accounts. tweaked the payment descriptions to make this clear during checkout)

    anyway, i don't want these PPexpress details to show on the packing slips. how do i turn them off?
    zencart installation is at http://oyinhandmade.com/shop

  2. #2
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: transaction details showing in note field?

    I don't recommend it, but if you insist, find this section of code, and add // before the $db->Execute line as shown:
    Code:
      function after_process() {
        global $insert_id, $db;
        // update OSH records for this order 
        $sql = "UPDATE ".TABLE_ORDERS_STATUS_HISTORY. "
                SET comments = concat(if (trim(comments) != '', concat(trim(comments), '\n\n'), ''),
                                     'Transaction ID: :transID " . 
                                     (isset($this->responsedata['PPREF']) ? "\nPPRef: " . $this->responsedata['PPREF'] : "") .
                                     (isset($this->responsedata['AUTHCODE'])? "\nAuthCode: " . $this->responsedata['AUTHCODE'] : "").
                                     "\nPayment Type: :pmtType " . 
                                     "\nTimestamp: :pmtTime " . 
                                     "\nPayment Status: :pmtStatus " . 
                                     " :AVS " . 
                                     "\nAmount: :orderAmt ')
                WHERE orders_id = ".(int)$insert_id;
        $sql = $db->bindVars($sql, ':transID', $this->transaction_id, 'noquotestring');
        $sql = $db->bindVars($sql, ':pmtType', $this->payment_type, 'noquotestring');
        $sql = $db->bindVars($sql, ':pmtTime', $this->payment_time, 'noquotestring');
        $sql = $db->bindVars($sql, ':pmtStatus', $this->payment_status, 'noquotestring');
        $sql = $db->bindVars($sql, ':AVS', ($this->avs != 'N/A' ? "\nAVS Code: ".$this->avs."\nCVV2 Code: ".$this->cvv2 : ''), 'noquotestring');
        $sql = $db->bindVars($sql, ':orderAmt', $this->amt, 'noquotestring');
    //    $db->Execute($sql);
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Nov 2005
    Posts
    53
    Plugin Contributions
    0

    Default Re: transaction details showing in note field?

    thanks for the quick reply!!

    may i ask... why don't you recommend it? possible side effects include... ?


    and i apologize if this is a simple question, but where should i be looking for said code? modules/payment/paypal?? document name?
    zencart installation is at http://oyinhandmade.com/shop

  4. #4
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: transaction details showing in note field?

    /includes/modules/payment/paypalwpp.php ... somewhere around lines 700-800
    the code and the line numbers will change in the next release


    My reason for not recommending are multifold. The main reason is that the customer has the right to know the auth code of their transaction, and the PayPal timestamp of the order, etc. Having that information visible authenticates the transaction as having been completed via PayPal, and not just marked as "paid" by your website. It's akin to giving them a CC receipt along with their printed invoice/receipt for goods purchased.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Nov 2005
    Posts
    53
    Plugin Contributions
    0

    Default Re: transaction details showing in note field?

    those are good reasons. but we have found that the customer receiving the auth code in their paypal email was good enough for them; and the admin site having the auth code in the admin area, as happened in earlier releases, was good enough for us. ;)

    the way you describe it does make a good argument for the info showing up on the invoices. when a customer gets a hard copy of their order details it's nice to include all payment info available.

    but - particularly when sending orders to a gift recipient - we are of the habit of including packing slips rather than the invoices. this was great b/c there was no financial info on it, and the buyer could include gift messages in their 'note' field at checkout which were printed on the packing slips and included in their gift orders. having the paypal details and totals built into the packing slip makes it TMI to include any printed matter at all in a gift order.

    is there a way to turn it on for invoices, and off for packing slips?

    i so not classify myself a programmer, and having worked with zencart for the past 18 months has been a constant brain-stretching discovery. i relish all i have learned, but i am not able to customize the core of its workings to this extent. i'm grateful for all the programmers who create it and the community which sustains it!

    perhaps i'll make a recommendation/request for the ability to turn this on and off in a future release.

    thanks again for your replies!
    zencart installation is at http://oyinhandmade.com/shop

  6. #6
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: transaction details showing in note field?

    Quote Originally Posted by exittheapple View Post
    ... - particularly when sending orders to a gift recipient - we are of the habit of including packing slips rather than the invoices. this was great b/c there was no financial info on it, and the buyer could include gift messages in their 'note' field at checkout which were printed on the packing slips and included in their gift orders. having the paypal details and totals built into the packing slip makes it TMI to include any printed matter at all in a gift order.

    is there a way to turn it on for invoices, and off for packing slips?
    What mods/addons do you have installed ?
    How are you printing Packing Slips ?
    The default "packing slip" generated by Zen Cart doesn't display any order-history comments.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Nov 2005
    Posts
    53
    Plugin Contributions
    0

    Default Re: transaction details showing in note field?

    i am printing using the 'batch form print' command in super orders (not version 2.0 yet)

    b/c of the amount of orders printed each day it's hard to print without this mod.


    it only shows in orders paid for via the paypal express module. i suppose one way around it would be to go back to paypal IPN.
    zencart installation is at http://oyinhandmade.com/shop

  8. #8
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: transaction details showing in note field?

    /includes/modules/payment/paypalwpp.php
    line 673 starts like this:
    Code:
      function after_process() {
        global $insert_id, $db, $order;
        // update OSH records for this order (which at outset is only a single record anyway)
        $sql = "UPDATE ".TABLE_ORDERS_STATUS_HISTORY. "
                SET comments = concat(if (trim(comments) != '', concat(trim(comments), '\n\n'), ''),
                                     'Transaction ID: :transID " . 
                                     "\nPayment Type: :pmtType " . 
                                     "\nTimestamp: :pmtTime " . 
                                     "\nPayment Status: :pmtStatus " . 
                                     " :AVS " . 
                                     "\nAmount: :orderAmount')
                WHERE orders_id = ".(int)$insert_id;
        $sql = $db->bindVars($sql, ':transID', $this->trans_id, 'noquotestring');
        $sql = $db->bindVars($sql, ':pmtType', $this->payment_type, 'noquotestring');
        $sql = $db->bindVars($sql, ':pmtTime', $this->payment_time, 'noquotestring');
        $sql = $db->bindVars($sql, ':pmtStatus', $this->payment_status, 'noquotestring');
        $sql = $db->bindVars($sql, ':AVS', ($this->avs != 'N/A' ? "\nAVS Code: ".$this->avs."\nCVV2 Code: ".$this->cvv2 : ''), 'noquotestring');
        $sql = $db->bindVars($sql, ':orderAmount', urldecode($this->responsedata['AMT'] . ' ' . $this->responsedata['CURRENCYCODE']), 'noquotestring');
        $db->Execute($sql);
    Change that to this:
    Code:
      function after_process() {
        global $insert_id, $db, $order;
        // add a new OSH record for this order's PP details
        $commentString = "Transaction ID: :transID: " . 
    		                 (isset($this->responsedata['PPREF']) ? "\nPPRef: " . $this->responsedata['PPREF'] : "") . 
    										 (isset($this->responsedata['AUTHCODE'])? "\nAuthCode: " . $this->responsedata['AUTHCODE'] : "") . 
                         "\nPayment Type: :pmtType: " . 
                         "\nTimestamp: :pmtTime: " . 
                         "\nPayment Status: :pmtStatus: " . 
                         ($this->avs != 'N/A' ? "\nAVS Code: ".$this->avs."\nCVV2 Code: ".$this->cvv2 : '') .
                         "\nAmount: :orderAmt: ";
        $commentString = $db->bindVars($commentString, ':transID:', $this->transaction_id, 'noquotestring');
        $commentString = $db->bindVars($commentString, ':pmtType:', $this->payment_type, 'noquotestring');
        $commentString = $db->bindVars($commentString, ':pmtTime:', $this->payment_time, 'noquotestring');
        $commentString = $db->bindVars($commentString, ':pmtStatus:', $this->payment_status, 'noquotestring');
        $commentString = $db->bindVars($commentString, ':orderAmt:', $this->amt, 'noquotestring');
    
        $sql_data_array= array(array('fieldName'=>'orders_id', 'value'=>$insert_id, 'type'=>'integer'),
                               array('fieldName'=>'orders_status_id', 'value'=>$order->info['order_status'], 'type'=>'integer'),
                               array('fieldName'=>'date_added', 'value'=>'now()', 'type'=>'noquotestring'),
                               array('fieldName'=>'customer_notified', 'value'=>0, 'type'=>'integer'),
                               array('fieldName'=>'comments', 'value'=>$commentString, 'type'=>'string'));
        $db->perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);
    This will force the PayPal comments to be added as a new order-history entry instead of appending them to the existing one.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  9. #9
    Join Date
    Nov 2005
    Posts
    53
    Plugin Contributions
    0

    Default Re: transaction details showing in note field?

    my head swims with appreciation! thank you so much. now i'll sit breathlessly by the cart to test print the next PPexpress checkout.

    :-D
    zencart installation is at http://oyinhandmade.com/shop

 

 

Similar Threads

  1. v150 Transaction details not showing on saved PDF/print
    By saplanet in forum Managing Customers and Orders
    Replies: 3
    Last Post: 3 Sep 2012, 03:22 AM
  2. Replies: 5
    Last Post: 8 Jul 2011, 08:48 PM
  3. No Email with Transaction Details?!
    By ohbrooke in forum Managing Customers and Orders
    Replies: 6
    Last Post: 13 Oct 2007, 05:06 AM
  4. Would like 'Note' field in products
    By darocket in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 1 Jun 2007, 02:43 AM
  5. Transaction Details
    By weaver in forum General Questions
    Replies: 0
    Last Post: 15 May 2006, 10:15 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