Zen Cart Logo
Forums / Managing Customers and Orders / Order Invoice - Product Description

Order Invoice - Product Description

Locked

Views: 3,217

Results 1 to 16 of 16
This thread is locked. New replies are disabled.
3 Dec 2008, 11:20 PM
#1
failed_attempt avatar

failed_attempt

New Zenner

Join Date:
Nov 2008
Posts:
21
Plugin Contributions:
0

Order Invoice - Product Description

Im having a problem when someone orders a item from my store. I sell pictures of sporting events and all it gives me on the invoice/order status is the name of the picture and not the description. The problem starts here b/c multiple pictures have the same name (Game of teams vs) and I need the invoice to list the description so that I can easily see what picture it is they have ordered. I've browsed through the admin setting to no avail. Could anyone let me know if it is possible to include the product description in the order invoices?

Thank you.

4 Dec 2008, 12:20 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Order Invoice - Product Description

Assign model/product #'s to them

4 Dec 2008, 12:40 AM
#3
failed_attempt avatar

failed_attempt

New Zenner

Join Date:
Nov 2008
Posts:
21
Plugin Contributions:
0

Re: Order Invoice - Product Description

kobra:

Assign model/product #'s to them

That would be kind of a pain since we have already did that with the description of the photos. There isnt a way to insert the description into the invoice?

4 Dec 2008, 1:02 AM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Order Invoice - Product Description

You would have to custom code the admin code for this and this is legacy code and table based, noot overrides in ther admin area either so insure that you maintain good notes and copies so as not to loose it on a reinstall for any reason.

4 Dec 2008, 1:30 AM
#5
failed_attempt avatar

failed_attempt

New Zenner

Join Date:
Nov 2008
Posts:
21
Plugin Contributions:
0

Re: Order Invoice - Product Description

kobra:

You would have to custom code the admin code for this and this is legacy code and table based, noot overrides in ther admin area either so insure that you maintain good notes and copies so as not to loose it on a reinstall for any reason.

That just seems odd to me that the product discription would not be included in the invoice....So in other words Im going to have to take my discription with the photo number and edit every product and input that number for the model number per say?

4 Dec 2008, 1:45 AM
#6
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Order Invoice - Product Description

That just seems odd to me that the product discription would not be included
This is because it is an item you want...
Zen Cart can not be one size fits all...although it does try

30 Aug 2010, 8:38 PM
#7
jdw1979 avatar

jdw1979

Zen Follower

Join Date:
Jun 2009
Location:
NC
Posts:
174
Plugin Contributions:
0

Re: Order Invoice - Product Description

kobra:

You would have to custom code the admin code for this and this is legacy code and table based, noot overrides in ther admin area either so insure that you maintain good notes and copies so as not to loose it on a reinstall for any reason.

Any hints on what this custom code might be? Or how I could figure it out? Definitely not a PHP developer here...

Pretty please?:smile:

30 Aug 2010, 9:27 PM
#8
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Order Invoice - Product Description

Any hints on what this custom code might be? Or how I could figure it out? Definitely not a PHP developer here...
There is a commercial help area on this forum you can post in

3 Sep 2010, 6:22 PM
#9
jdw1979 avatar

jdw1979

Zen Follower

Join Date:
Jun 2009
Location:
NC
Posts:
174
Plugin Contributions:
0

Re: Order Invoice - Product Description

Well, I must admit that I'm always trying to figure this stuff out for myself, so I can be a better admin of the store. Not to mention, it's cheaper that way.

So...

It seems (after researching the forum) that I need to edit both admin/includes/classes/order.php , and admin/orders.php, right?

I see how the data is inserted and output via the order.php class, which has also helped me discover why the description can't be easily output in the admin interface. There is no products_description field in the orders table! Ah ha! The plot thickens...

So, in order to get the description output in the admin orders interface I have to call the products_description table...which is where I get fuzzy...correlating the correct products_description, in relation to the product_id, and then tie those to their respective oID. Okay...now it's getting to be a lot like math. Damnit. :frusty:

Little help from the Zen Gurus? I'd love to learn how to do this. :lamo:

3 Sep 2010, 6:54 PM
#10
ajeh avatar

ajeh

Oba-san

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

Re: Order Invoice - Product Description

First, do you need to know the Product Description forever? Or for as long a the Product is in your database?

What this question means is, if the products_id for the Browns Around Town photo is 33 today, will it always be products_id 33 tomorrow? next week? next year?

And if the Product using products_id 33 got deleted, and next week or next month or next year you look at the invoice ... do you need the description?

If you want a permanent record of the Product Description, then you want to store Today's products_description in the orders_products table to save it forever ...

If you want it as long as it is in the products table and don't care if when you delete the Product you cannot see the Product description and it just reading NOT FOUND vs Today's products_description then you can just use a quick look up ...

So, the question is ... do you need a Today's Products Description or do you want a Forever Products Description on the Order? :unsure:

3 Sep 2010, 7:05 PM
#11
jdw1979 avatar

jdw1979

Zen Follower

Join Date:
Jun 2009
Location:
NC
Posts:
174
Plugin Contributions:
0

Re: Order Invoice - Product Description

Ajeh:

If you want it as long as it is in the products table and don't care if when you delete the Product you cannot see the Product description and it just reading NOT FOUND vs Today's products_description then you can just use a quick look up ...

This one, totally.

We keep records of all orders in a separate inventory and accounting system (as only a small percentage of our orders come from our website). The thing that my coworkers are unhappy with is that our data feed (over which I have no control...damnit) has stupid, non-descript titles like "Cholestech Accessories" (this title is the same for at least 70 different products). I know, I know, it's clunky and awful. I would just fix the data feed myself, but it's too large to work with manually (60,000 products in our store). Sorry...that turned out to be more like whining than I intended. Thanks a lot for your response.

3 Sep 2010, 11:25 PM
#12
ajeh avatar

ajeh

Oba-san

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

Re: Order Invoice - Product Description

You still need to explain if you need the products_description to be available even if the Product is deleted later after the Orders have been processed etc. of if you just need the Products Description to always be on the Order for each Product ...

If you need it always with the Order, then it will need to be saved in the orders_products table and some numerous code changes are needed ...

If you need it for a short period of time, such as when the Product might be deleted and it is no longer available, you can just use a function to pull the information for display and if the Product is not found then display:
Description Not Found

Which way do you really need this to work?

8 Sep 2010, 12:29 PM
#13
jdw1979 avatar

jdw1979

Zen Follower

Join Date:
Jun 2009
Location:
NC
Posts:
174
Plugin Contributions:
0

Re: Order Invoice - Product Description

If you need it for a short period of time, such as when the Product might be deleted and it is no longer available, you can just use a function to pull the information for display and if the Product is not found then display:
Description Not Found

That one.

We enter these orders into a completely different accounting and inventory system as we receive them. So, we only need the online record to exist for a short while.

8 Sep 2010, 2:08 PM
#14
ajeh avatar

ajeh

Oba-san

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

Re: Order Invoice - Product Description

You could use the:
function zen_get_products_description($product_id, $language_id)

from the general.php and pass it the current values for $product_id and $language_id from where you are in the code for the file where you want to see this ...

If you need to clean up the products_description because of html code that might be in it, you might look how the Product Listing does it ...

8 Sep 2010, 2:49 PM
#15
jdw1979 avatar

jdw1979

Zen Follower

Join Date:
Jun 2009
Location:
NC
Posts:
174
Plugin Contributions:
0

Re: Order Invoice - Product Description

Ajeh:

You could use the:
function zen_get_products_description($product_id, $language_id)

from the general.php and pass it the current values for $product_id and $language_id from where you are in the code for the file where you want to see this ...

Okay...I kinda get it.

So, I would want to put the first part of this code (the function) into /admin/includes/orders.php (not the admin/includes/classes/order.php), , as that is the file actually outputting the data into the browser, correct?

The second part is where I get confused; "general.php" is where the function is created? So I don't have to do anything there, right? That's just where all of the functions are defined...I'm guessing.

So...in orders.php, I'd find the table where the order data is actually being output, simply insert another row in that table, and insert the "zen_get_products_description" function there...I'm hoping...

8 Sep 2010, 3:41 PM
#16
ajeh avatar

ajeh

Oba-san

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

Re: Order Invoice - Product Description

The function itself is in the file:
/admin/includes/functions/genera.php

you do not need to touch this, just use the function from it:
zen_get_products_description($product_id, $language_id)

On the file where you want to output the data, you would then find how to address the products_id and languages_id to pass to this function ...

Most likely:
$order->products[$i]['id']
$_SESSION['languages_id']