Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Configuring the Zen Cart Admin / Managing Customers and Orders / How to display "Products URL" on invoice ?

How to display "Products URL" on invoice ?

Locked

Started by sab522 on 20 May 2009, 5:31 PM · Views: 2,014

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
20 May 2009, 5:31 PM
#1
sab522 avatar

sab522

New Zenner

Join Date:
Mar 2008
Posts:
9
Plugin Contributions:
0

Post #1 by sab522

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

Zen Cart 1.3.8

21 May 2009, 8:37 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #2 by ajeh

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!

26 May 2009, 3:37 PM
#3
sab522 avatar

sab522

New Zenner

Join Date:
Mar 2008
Posts:
9
Plugin Contributions:
0

Post #3 by sab522

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

Zen Cart 1.3.8

26 May 2009, 3:39 PM
#4
sab522 avatar

sab522

New Zenner

Join Date:
Mar 2008
Posts:
9
Plugin Contributions:
0

Post #4 by sab522

Here is the image I forgot to attach.

Zen Cart 1.3.8

27 May 2009, 1:18 PM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #5 by ajeh

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

However, you can look up the URL from the products table with the function:

/*
 * 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!

12 Jul 2009, 9:39 PM
#6
susb8383 avatar

susb8383

Zen Follower

Join Date:
Feb 2008
Posts:
129
Plugin Contributions:
0

Post #6 by susb8383

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.

13 Jul 2009, 12:34 AM
#7
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #7 by ajeh

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!

13 Jul 2009, 3:04 AM
#8
susb8383 avatar

susb8383

Zen Follower

Join Date:
Feb 2008
Posts:
129
Plugin Contributions:
0

Post #8 by susb8383

Gotcha.

Thanks.