Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2014
    Location
    Indiana
    Posts
    91
    Plugin Contributions
    0

    Default Shipstation Tweak for v156 - Updated By

    ZC 1.5.6 has a new field in the table zen_orders_status_history which is titled 'Updated_by' and shows the username of the person creating the update.

    For a very minor update, you can make the following change to the shipstation_zc.php file so that any updates by Shipstation will show the username instead of just a blank.

    Around line 346, find the section that looks similar to this and replace it with this code:

    Code:
    $db->Execute("insert into " . TABLE_ORDERS_STATUS_HISTORY . "
                              (orders_id, orders_status_id, date_added, customer_notified, comments, updated_by)
                              values ('" . (int) $_GET['order_number'] . "',
                              '" . zen_db_input($status) . "',
                              now(),
                              '" . zen_db_input($customer_notified) . "',
                              '" . zen_db_input($comments) . "',
                      '" . zen_db_input($_GET['SS-UserName']) . "')");
    Again, quite minor, but thought we would share it.
    Last edited by DrByte; 22 Sep 2020 at 02:16 AM. Reason: added the zen_db_input wrapping

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,401
    Plugin Contributions
    87

    Default Re: Shipstation Tweak for v156 - Updated By

    Yep, I've been applying that change to the sites I manage that use shipstation and have the 'updated_by' field (whether via the plugin or zc156).

    Update: Just make sure to wrap that $_GET value with zen_db_input ... just in case there are single-quotes in the shipstation-admin's name. I usually just hardcode the `updated_by` field as 'shipstation'.

  3. #3
    Join Date
    Sep 2014
    Location
    Indiana
    Posts
    91
    Plugin Contributions
    0

    Default Re: Shipstation Tweak for v156 - Updated By

    Thank you lat9. Both valid points.

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

    Default Re: Shipstation Tweak for v156 - Updated By

    .

    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.

 

 

Similar Threads

  1. v156 Dropshipping and PDF Purchase Orders for V156
    By dallison in forum Addon Shipping Modules
    Replies: 11
    Last Post: 3 Dec 2019, 07:14 PM
  2. v156 Autoinstall vs Manual Installed .... differences between v156 and v156
    By shrimp-gumbo-mmmhhh in forum General Questions
    Replies: 3
    Last Post: 26 Mar 2019, 05:55 PM
  3. Shipstation php file edit for super orders PO/purchase order value pass
    By jpietrowiak in forum Addon Shipping Modules
    Replies: 0
    Last Post: 5 Sep 2013, 02:34 AM
  4. Trying to tweak Javascript for Collapsible Text
    By giftmeister in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 17 Jan 2010, 09:40 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