Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    Join Date
    May 2011
    Location
    Tennessee
    Posts
    496
    Plugin Contributions
    0

    Default How To Add New Product Fields to product_info page?

    [Note: remember to include site URL, ZC version, list of plugins, PHP version, etc ... read the Posting Tips shown above for information to include in your post here.
    And, remove this comment before actually posting!]

    I added a couple fields to the products table. I need the fields displayed on the product_info page does anyone have suggestions how I can add them in the current 2.1.0 version?

  2. #2
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,294
    Plugin Contributions
    1

    Default Re: How To Add New Product Fields to product_info page?

    It's in the Docs - https://docs.zen-cart.com/dev/code/d...custom_fields/

    Edit: although it doesn't provide the actual code for you.
    Simon

  3. #3
    Join Date
    May 2011
    Location
    Tennessee
    Posts
    496
    Plugin Contributions
    0

    Default Re: How To Add New Product Fields to product_info page?

    Quote Originally Posted by simon1066 View Post
    It's in the Docs - https://docs.zen-cart.com/dev/code/d...custom_fields/

    Edit: although it doesn't provide the actual code for you.
    Yes, I found that but not much help without some code examples.

  4. #4
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,285
    Plugin Contributions
    125

    Default Re: How To Add New Product Fields to product_info page?

    This page

    https://docs.zen-cart.com/dev/code/add_field_products/

    points to a plugin that shows how it's done.
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  5. #5
    Join Date
    May 2011
    Location
    Tennessee
    Posts
    496
    Plugin Contributions
    0

    Default Re: How To Add New Product Fields to product_info page?

    Quote Originally Posted by swguy View Post
    This page

    https://docs.zen-cart.com/dev/code/add_field_products/

    points to a plugin that shows how it's done.
    This what I was looking for. It works using the two columns added but when I use a table field that I added it will not display columns I added. I notice the comment in the "tpl.product_info_details.php" a comment "* Loaded automatically by tpl_product_infoe_display.php" do i need to add code to load the fields that I added to the Products table?

  6. #6
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,754
    Plugin Contributions
    30

    Default Re: How To Add New Product Fields to product_info page?

    do i need to add code to load the fields that I added to the Products table?
    Er...yes, if want to display them. As per the example I provided for the two other fields. I've just updated the readme to detail this.
    Steve
    github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

  7. #7
    Join Date
    May 2011
    Location
    Tennessee
    Posts
    496
    Plugin Contributions
    0

    Default Re: How To Add New Product Fields to product_info page?

    Quote Originally Posted by torvista View Post
    Er...yes, if want to display them. As per the example I provided for the two other fields. I've just updated the readme to detail this.
    I think the general idea in using the code is great and appears to work to a certain point.

    I tried using just using the two code examples against a column that I created in the products table. It broke the product edit page. I tried just changing the text parts of the column name and that displayed the column names which works. But as soon as I try using the examples with a new column in the table it stops displaying right after the product name info.

    Got any ideas?

  8. #8
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,285
    Plugin Contributions
    125

    Default Re: How To Add New Product Fields to product_info page?

    Post the log that was produced.
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  9. #9
    Join Date
    May 2011
    Location
    Tennessee
    Posts
    496
    Plugin Contributions
    0

    Default Re: How To Add New Product Fields to product_info page?

    Quote Originally Posted by swguy View Post
    Post the log that was produced.
    I am not finding any log files. Where should they be?

    Let me clarify on thing it is not crashing it just doesn't display the added field.
    Last edited by jodean; 19 Mar 2025 at 06:38 PM. Reason: Missing information

  10. #10
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,285
    Plugin Contributions
    125

    Default Re: How To Add New Product Fields to product_info page?

    When you say, "it stops displaying right after the product name info" you don't mean you get a partial blank screen there?
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. How To Add New Product Fields?
    By webego in forum Setting Up Categories, Products, Attributes
    Replies: 158
    Last Post: 18 Oct 2019, 04:19 PM
  2. How do I add new form fields on the registration page?
    By RawKarat in forum General Questions
    Replies: 1
    Last Post: 13 Dec 2009, 10:49 PM
  3. Add new fields to product listing page
    By hovsepations in forum General Questions
    Replies: 10
    Last Post: 13 Dec 2008, 06:19 PM
  4. I can't just add new fields and refer to them in product_info.php can I?
    By Ben-B in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 24 Apr 2008, 11:25 AM
  5. How i can add new data fields to a Product
    By shreesoft in forum Customization from the Admin
    Replies: 4
    Last Post: 2 Oct 2006, 03:10 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