Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2008
    Posts
    98
    Plugin Contributions
    0

    Default Truncate Product Name in Packing Slip

    Previously I was able to use the function zen_trunc_string to truncate product names in the shopping cart sidebox.

    Now I would like to also truncate product names in the packing slip.

    I presume that the area I need to address is here:

    PHP Code:
    <tr class="dataTableRow">' . "\n" .
               '        
    <td class="dataTableContent" valign="top" align="right">' . $order->products[$i]['qty'] . '&nbsp;x</td>' . "\n" .
               '        
    <td class="dataTableContent" valign="top">' . $order->products[$i]['name']; 
    However, I have not been able to figure how to use the truncate function there to accomplish what I want. All my efforts have ended up with either non-functioning or blank packing slips.

    So can someone lend a hand? Thanks

  2. #2
    Join Date
    Sep 2008
    Posts
    98
    Plugin Contributions
    0

    Default Re: Truncate Product Name in Packing Slip

    In case anyone is interested, I was finally able to accomplish this.

    First I needed to insert the truncate string function found in includes/functions/functions_general.php into admin/packingslip.php.

    Then all I had to do was to modify the string relating to the product name in the packingslip.php file to read:

    (zen_trunc_string($order->products[$i]['name'], 105))

    The 105 is what I finally decided I wanted as the length of the product name in my packing slips...but that number can be any number that one would want to have.

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Truncate Product Name in Packing Slip

    Thanks for posting the update to the solution to adjusting the length of the products_name field on the orders packing slip ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 

Similar Threads

  1. Symbols truncate Product Name and Description after editing
    By Sprainbrook in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 5 Mar 2010, 03:59 AM
  2. Truncate Product Name for Monthly Centerbox
    By Berserker in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 16 Jul 2009, 02:35 AM
  3. Changing Font size of Shop name on invoice & packing slip
    By tracib in forum Managing Customers and Orders
    Replies: 4
    Last Post: 18 Feb 2008, 03:15 PM
  4. Removing company name from packing slip
    By hboospumpkin in forum Managing Customers and Orders
    Replies: 3
    Last Post: 28 Apr 2007, 08:09 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