Results 1 to 8 of 8
  1. #1
    Join Date
    Mar 2008
    Posts
    9
    Plugin Contributions
    0

    Default How to display "Products URL" on invoice ?

    Hi,

    I'm using Zen Cart 1.3.8.
    I want to add the "Product URL" to the invoice. The "Product URL" is found in the products_description Table.
    How can I do that ? Please help. Thank you.

    Sabrina

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

    Default Re: How to display "Products URL" on invoice ?

    I would not recommend this ...

    Too many URLs = spamm flag

    Too many URLs = multiple open windows

    Just the one URL to their Account History works well and you do not run into tripping various spamm flags ...

    What did you want to do with the separate Product URLs that you could do with the My Account history?
    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!]
    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!

  3. #3
    Join Date
    Mar 2008
    Posts
    9
    Plugin Contributions
    0

    Default Re: How to display "Products URL" on invoice ?

    Hi Linda,

    We need add an additional field to product : Location (warehouse gate number) and display it on the invoice.

    As we don't have time and don't need the URL field, we just want to put this Location information into this URL field.

    My question is how can I display this Location at the bottom of the invoice ? (please see the image attached)

    Here's the code for that in my invoice.php (Item and Qty are OK, but it doesn't work for the Location:
    <table width="50%" align="center">
    <tr>
    <td align="center"><b>Item</b></td>
    <td align="center"><b>Qty</b></td>
    <td align="center"><b>Location</b></td>
    </tr>
    <tr>
    <td align="center"><?php for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) {echo $order->products[$i]['model']. "<br />"; }
    ?></td>
    <td align="center"> <?php for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) {echo $order->products[$i]['qty']. "<br />"; }
    ?></td>
    <td align="center"> <?php for ($i = 0, $n = sizeof($pInfo->products); $i < $n; $i++) {echo $pInfo->products[$i]['url']. "<br />"; }
    ?></td>
    </tr>
    </table>

    Please help. Thank you.
    Sabrina

  4. #4
    Join Date
    Mar 2008
    Posts
    9
    Plugin Contributions
    0

    Default Re: How to display "Products URL" on invoice ?

    Here is the image I forgot to attach.
    Attached Images Attached Images  

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

    Default Re: How to display "Products URL" on invoice ?

    The URL is not saved to the orders tables ...

    However, you can look up the URL from the products table with the function:
    Code:
    /*
     * Return any field from products or products_description table
     * Example: zen_products_lookup('3', 'products_date_added');
     */
      function zen_products_lookup($product_id, $what_field = 'products_name', $language = '') {
    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!]
    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!

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

    Default Re: How to display "Products URL" on invoice ?

    Linda, is your code above complete? It looks to me like it might have been cut off. I see an a lone { at the end of the final line.

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

    Default Re: How to display "Products URL" on invoice ?

    I was just showing the start of the function that can be used and its syntax ... this is not the actual code to use, just what function you can use ...
    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!]
    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!

  8. #8
    Join Date
    Feb 2008
    Posts
    129
    Plugin Contributions
    0

    Default Re: How to display "Products URL" on invoice ?

    Gotcha.

    Thanks.

 

 

Similar Threads

  1. How to display "soldout" icon in "new products" area?
    By zeliana in forum Customization from the Admin
    Replies: 1
    Last Post: 23 Oct 2012, 09:15 PM
  2. Replies: 4
    Last Post: 16 Oct 2011, 12:58 AM
  3. How to remove ellipses ("...") after "All Products" and "New Products" on home page?
    By jthurman in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 18 May 2010, 03:30 PM
  4. How to display more products on the main page or "new Products"
    By corditreasures in forum General Questions
    Replies: 2
    Last Post: 9 Mar 2010, 04:03 AM
  5. how to display text link in "New Products"、"Featured Products"....?
    By boy123 in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 24 Dec 2006, 06:07 AM

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