Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2009
    Posts
    8
    Plugin Contributions
    0

    Default Custom Invoice help

    First off all hats of the zen cart devs, so far im very impressed with zen cart .

    Now what I'm trying to do is add more info to the invoice of my orders on the admin side, I have a pricing group, and 2 additional customer fields that I want to tack on to the Admin invoice to make order processing easier for the client.

    Anyone every try doing this, or ever better have a invoice mod available.

    Any input, or hysterical laughter is appreciated.

  2. #2
    Join Date
    Nov 2009
    Posts
    8
    Plugin Contributions
    0

    Default Re: Custom Invoice help

    Not this note, im trying to edit code and when it does not work im not getting any php error messages, any way to turn them on. IM editing order.php and invoice.php

    This is my code in order.php

    $xinfocode = "select stuff, stuff2 from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$order[customers_id] . "'";
    $xinfo = $db->Execute($xinfocode);

    Hewre is my code from invoice.php
    <td class="main"><b><?php echo "stuff"; ?></b></td>
    <td class="main"><?php echo $order->xinfo['stuff']; ?></td>
    <td class="main"><b><?php echo "stuff2"; ?></b></td>
    <td class="main"><?php echo $order->xinfo['stuff2']; ?></td>

    Stuff and Stuff2 are not the real names, Im under a NDA so .......
    I have alot of php xp but not alot of mysql so any helpwould be great.

    Right now invoice and order sections are blank
    Last edited by Ethan; 21 Dec 2009 at 11:30 PM.

  3. #3
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,501
    Plugin Contributions
    88

    Default Re: Custom Invoice help

    You need to check out the debug utility, available from the add-ons area:

    http://www.zen-cart.com/index.php?ma...roducts_id=860

  4. #4
    Join Date
    Nov 2009
    Posts
    8
    Plugin Contributions
    0

    Default Re: Custom Invoice help

    I got it working Heres the code from invoice.php ,

    Get the data from the sql DB

    $order_xinfo = $db->Execute("select stuff, stuff2, customers_group_pricing
    from " . TABLE_CUSTOMERS . "
    where customers_id = '" (int)$order_check->fields['customers_id'] . "'");

    Here is where i print it out in the invoice

    <td class="main"><b><?php echo ENTRY_PAYMENT_METHOD; ?></b></td>
    <td class="main"><?php echo $order->info['payment_method']; ?></td>
    <td class="main"><b><?php echo "Credit card number"; ?></b></td>
    <td class="main"><?php echo $order->info['cc_number']; ?></td>
    <td class="main"><b><?php echo "Credit card exp date"; ?></b></td>
    <td class="main"><?php echo $order->info['cc_expires']; ?></td>
    <td class="main"><b><?php echo "Stuff"; ?></b></td>
    <td class="main"><?php echo $order_xinfo->fields['Stuff']; ?></td>
    <td class="main"><b><?php echo "stuff2"; ?></b></td>
    <td class="main"><?php echo $order_xinfo->fields['stuff 2']; ?></td>
    <td class="main"><b><?php echo "Priceing Group"; ?></b></td>
    <td class="main"><?php if($order_xinfo->fields['customers_group_pricing']== 4) echo "append 0 to order number";
    if($order_xinfo->fields['customers_group_pricing']== 7) echo "append 2 to order number";
    if($order_xinfo->fields['customers_group_pricing']== 2) echo "append 1 to order number";
    if($order_xinfo->fields['customers_group_pricing']== 2) echo "append 3 to order number";?></td>

  5. #5
    Join Date
    Feb 2008
    Posts
    6
    Plugin Contributions
    0

    customer issue Re: Custom Invoice help

    Hi Ethan,

    are you sure that the above code is working correctly for you?
    I tried your code inside admin/invoice.php but the customers_group_pricing is not being printed.

    Did you modify any other files except admin/invoice.php ???

    Have you modified at all the admin/includes/classes/order.php
    or /includes/classes/order.php files?

 

 

Similar Threads

  1. creating a custom invoice
    By mohinder in forum Managing Customers and Orders
    Replies: 3
    Last Post: 12 Dec 2008, 05:40 PM
  2. Adding Custom Field to Invoice
    By jacque427 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 10 Sep 2007, 12:27 AM

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