Zen Cart Logo
Forums / Managing Customers and Orders / Add Product Description to Invoice/orders/emails ect;

Add Product Description to Invoice/orders/emails ect;

Views: 17,719

Results 41 to 41 of 41
8 Nov 2014, 8:13 PM
#41
apollowilcox avatar

apollowilcox

Zen Follower

Join Date:
Sep 2014
Location:
Indiana
Posts:
123
Plugin Contributions:
0

Add Product Description to Invoice/orders/emails ect;

Recently upgraded to ZC v1.5.3. This mod seems to work fine. Also, we upgraded to the Edit Orders 4.1.4 plug-in. IMO, Edit Orders ("EO") is one of the most useful plug-ins available for ZenCart.

The new EO version behaves a bit differently than the prior version that we used. Anytime you "update" from the edit_orders page, it *re-writes *the entire lines from the orders_Products table for that order, so the product descriptions from this mod get deleted. Even if all you did was change the quantity on one line item, every line gets re-written and loses the product description saved by this mod.

I made the changes below to the edit_orders mod which seem to 1) save (i.e. fetches and re-writes) the product descriptions and 2) saves new product descriptions for any additional products added to the order via the edit order screen. I'm no programmer, so tread carefully and feedback any edits/ improvements for all to use. But it seems to work fine here.

In the file: admin13/includes/functions/extra_functions/edit_orders_functions.php; Near line 469; Change from:

'SELECT `p`.`products_id`, `p`.`master_categories_id`, `p`.`products_status`, ' .
``` TO: 

'SELECT p.products_id, p.master_categories_id, p.products_status, pd.products_description, ' .

Then near line 486, after the line: ```
'model' => $query->fields['products_model'],
``` add the line: ```
'description' => $query->fields['products_description'],

Repeat this at/about line 768: find ```
'products_model' => $product['model'],

and enter a new line below it:  ```
'products_description' => $product['description'],