Results 1 to 10 of 41

Hybrid View

  1. #1
    Join Date
    Jul 2006
    Location
    Washington State
    Posts
    77
    Plugin Contributions
    0

    Add Product Description to Invoice/orders/emails ect;

    I am a stamp dealer and am looking for the code changes needed to add the Products text description to invoices and orders and packing slips ect;. PRODUCTS_DESCRIPTION/PRODUCTS_DESCRIPTION_TEXT is the database table needed. Presently the Zencart only shows the NAME and MODEL and so forth. Would like to add DESCRIPTION after the NAME column on these. Text descriptions show pertinant information on condition of stamps flaws, types, ect;.
    Here is example:
    Present:
    NAME MODEL PRICE
    Scott#34 - .50

    Would like this:
    NAME DESCRIPTION MODEL PRICE
    Scott#34 F/VF MINT - .50

    Any help with getting the proper PHP pages to change this and the code to put into them would GREATLY be appreciated. Believe this may help many other merchants in the future as well. This ZENCART is a masterpiece!
    BEST!
    John
    http://golowesstamps.com
    Cart not live....YET! Will be soon linked to "SALES" links.

  2. #2
    Join Date
    Mar 2006
    Location
    Australia
    Posts
    289
    Plugin Contributions
    3

    Default Re: Add Product Description to Invoice/orders/emails ect;

    Hi there
    Have a look at invoice.php and orders.php

  3. #3
    Join Date
    Jul 2006
    Location
    Washington State
    Posts
    77
    Plugin Contributions
    0

    Default Re: Add Product Description to Invoice/orders/emails ect;

    These are in the admin folder correct? Have looked but still do not understand what to do. I know I need to add a couple of lines of code to them but am not sure what/how. Advise greatly appreciated.

  4. #4
    Join Date
    Jul 2006
    Location
    Washington State
    Posts
    77
    Plugin Contributions
    0

    Re: Add Product Description to Invoice/orders/emails ect;

    Went into the Admin section. Found 2 invoice.php files. One is
    ADMIN/INVOICE.PHP
    The other I found in
    ADMIN/INCLUDES/LANGUAGES/ENGLISH/INVOICE.PHP
    I added the following line in the "define" section of the ENGLISH file:

    define('TABLE_HEADING_PRODUCTS_DESCRIPTION', 'Description');

    Then added the following line to the td class list in the ADMIN file before the "Model" class:

    <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS_DESCRIPTION; ?></td>

    This put "description" perfectly in the title row on the invoices.

    I then researched into accessing the text data needed and to my dismay I see there is no PRODUCTS_DESCRIPTION table under the ORDERS_PRODUCTS section in the MySQL Database...thus I cannot call the description. It appears to be more complex than I thought to do this modification. The processes used when a customer orders a product need to be changed so that the database places the "TEXT" description into another table in the ORDERS_PRODUCTS CATEGORY of the MySQL database and then we can call it to be shown on invoices/orders/ect;

    Any advise and/or help with this would be greatly appreciated.
    Best regards.
    John(golowenow)

  5. #5
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Add Product Description to Invoice/orders/emails ect;

    There are a few ways to do this.

    First a comment: For shopowners who use the products-description field to show detailed, colorful, lengthy details about their products, this would be a bad idea. You don't want a 1/2 screen of information coming up under each product ... you'd annoy more customers than you'd please.
    However, in the case of your stamp store, you likely only need a small amount of information and likely rely more on images than text. Thus, perhaps the products-description content could be sufficient.

    Possible approaches:
    1. Use READONLY attributes to describe the components. This is ideal if there are common things that can be attributed to these products. It's not ideal for one-off details.

    2. Add a custom field to the product which is editable in the admin area when entering/editing products, and is optionally displayed in the shop. It would be primarily used for displaying order details on invoice/packing-slip etc.
    You would have to modify the order class to populate the orders_products.details field from the products_description.details field when the order is placed. The order class also sends the order-confirmation email, so would have to accomodate this as well. The invoice/packing-slip would need to pull the info for display too.

    3. Build information into the products_name. However, this is by default limited to 100 characters. This may not produce the desired visual. You could override the long name using per-product-metatags settings and set an override title for the product for more pleasant title display in browser and search engines.

    4. You could extend the orders_products.products_name field to much longer and then tell the order class to append the description to the name, up to a maximum of XX characters total. You'd need to do some special coding to handle the insertion of a suitable line-break character (emails vs browser issues) or other separator notation, and pull the description from the database (ie: zen_get products_description($products_id), etc).


    I think #4 is likely the least overall work but may produce some odd results in reports, etc.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #6
    Join Date
    Jul 2006
    Location
    Washington State
    Posts
    77
    Plugin Contributions
    0

    Re: Add Product Description to Invoice/orders/emails ect;

    Thank you DrByte for this information! The 4th option is the key. I am pretty confused as to how to do this though. There are several order classes so do not know which to edit. Am not to concerned with reports ect; because the descriptions will not be very long at all. most would be like

    Scott #1113-34 VF MNH(1115 has a small crease)

    Temember I only want to pull
    PRODUCT_DESCRIPTION/PRODUCT_DESCRIPTION (TEXT)
    No images ect;

    I looked into the data base and the ORDER_PRODUCTS/PRODUCTS_NAME field is set at VARCHAR 64.
    Would I change it to say 150?

    I am not very good with PHP code. Most I copy and paste into apropriate areas. Could you please leave some examples I can insert and play aroud with? The breaking point issue really has me stumped. Also PRODUCT_DESCRIPTION($PRODUCT_ID).

    Really appreciate your time in this DrByte. I rhink this thread will help others with similar issues like mine. I sell stamps individually, not in bulk and my site is designed to be the most honest and descriptive on the web. Most I sell have no faults thus a DESCRIPTION noted on invoices, ect; looks like this:

    NAME:!970 Cayman Island 1113-34 FULL SET DESCRIPTION: Scott #1113-34 VF MNH

    BUT some require additional Descriptive content that needs to be printed out on invoices ect; to guarantee the invoice is accurate to protect me when someone purchases a single or set WITH a fault.

    I presently have PayPal shopping cart buttons that I put this into. It requires I type these descriptions twice(one for the page and one for the button) Zencart among MANY other things will solve that problem if I can get this one issue resolved.

    Once again, thank you for your responses to my issue.

 

 

Similar Threads

  1. Add Product Image into orders emails
    By marknew in forum Managing Customers and Orders
    Replies: 1
    Last Post: 7 Oct 2010, 02:26 AM
  2. Order Invoice - Product Description
    By Failed_Attempt in forum Managing Customers and Orders
    Replies: 15
    Last Post: 8 Sep 2010, 04:41 PM
  3. Looking to add print invoice and shipp invoice from admin---> orders
    By r4fdud in forum Upgrading from 1.3.x to 1.3.9
    Replies: 0
    Last Post: 15 Mar 2009, 11:21 PM
  4. adding product description to emails problem
    By golowenow in forum Managing Customers and Orders
    Replies: 9
    Last Post: 24 Apr 2007, 02:54 AM
  5. Add Product Description to Orders
    By DiZZ in forum General Questions
    Replies: 1
    Last Post: 8 Nov 2006, 04:08 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