Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,107
    Plugin Contributions
    11

    Default Problem Adding Data to Packing Slip

    Zen Cart 155a
    PHP 5.6.23
    Apache 2.4.18
    MODS -- All Latest Version
    Ckeditor
    Responsive Color Changes for 155
    Clone Template
    Display Logs
    Edit Orders
    Encrypted Master Password
    Inventory Report
    Monthly Sales & Tax
    Mydebug Backtrace
    Product Images on Invoice_Email
    Quick Status Update
    Report All Errors
    Scheduled Events
    USPS Shipping

    Problem: I have added a define page for suggested product usage and guarantee information to be added to the packing slip. Everything is working as expected as far as the printing of the Packing Slip. All the information is there as expected BUT each access of the packing slip creates the following error whether printed or not.
    Code:
    [08-Aug-2016 14:57:59 America/Chicago] Request URI: /buford/packingslip.php?oID=103, IP address: 216.177.186.199
    #1 zen_get_file_directory() called at [/home/russiana/public_html/buford/packingslip.php:211]
    
    
    [08-Aug-2016 14:57:59 America/Chicago] PHP Warning: Missing argument 2 for zen_get_file_directory(), called in /home/russiana/public_html/buford/packingslip.php on line 211 and defined in /home/russiana/public_html/buford/includes/functions/general.php on line 3187
    Below are the listed file locations with added lines either side of the line.
    Packing Slip:
    Code:
    209 <!-- body_text_eof //-->
    210 <!--BOF admin editable packing slips  *** JET *** -->
    211 <?php require '../' . (zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/define_packing_slips'));?>
    212 <!--EOF admin editable packing slips -->
    General:
    Code:
    /**
     * find template or default file
     */
      function zen_get_file_directory($check_directory, $check_file, $dir_only = 'false') {
        global $template_dir;
    
    
        $zv_filename = $check_file;
        if (!strstr($zv_filename, '.php')) $zv_filename .= '.php';
    
    
        if (file_exists($check_directory . $template_dir . '/' . $zv_filename)) {
          $zv_directory = $check_directory . $template_dir . '/';
        } else {
          $zv_directory = $check_directory;
        }
    
    
        if ($dir_only == 'true') {
          return $zv_directory;
        } else {
          return $zv_directory . $zv_filename;
        }
      }
    
    
    /**
    Little bit deeper than my expertise. Files are located at the location(s) mentioned in the error log.

    THANX

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

    Default Re: Problem Adding Data to Packing Slip

    Instead of:
    Code:
    <?php require '../' . (zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/define_packing_slips'));?>
    I suggest splitting the path+filename into its separate parts since the function is asking for the path first and then the file as the 2nd param:
    Code:
    <?php require '../' . (zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', 'define_packing_slips'));?>
    .

    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
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,107
    Plugin Contributions
    11

    Default Re: Problem Adding Data to Packing Slip

    That did the trick!
    THANX

 

 

Similar Threads

  1. v139h Adding Manufacturers_id to Invoice/packing Slip
    By NickyCarroll in forum Customization from the Admin
    Replies: 3
    Last Post: 25 Apr 2012, 10:44 PM
  2. Adding a line of text to packing slip
    By Big_Woody in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 31 Oct 2007, 10:16 PM
  3. Adding my comments to a packing slip?
    By HandcraftedUK in forum Managing Customers and Orders
    Replies: 4
    Last Post: 2 May 2007, 09:30 AM
  4. Packing Slip - Adding Manufacturer
    By Pip in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 12 Dec 2006, 03:37 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