Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2007
    Posts
    62
    Plugin Contributions
    0

    Default adding field to database for product listing

    Hello to all
    I have added a field name 'product_ref' into the table 'product' and 'product_description'. The field is a reference number which references a part of the category image. I don't know to which table I should add that field. So I added that field to both the table, because I wanted to display the reference number in the product listing. I don't find the SQL statement which is used to fetch the data fields in the product listing. Any suggestion is appreciable
    Thank you

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: adding field to database for product listing

    Try includes/modules/product_listing.php

  3. #3
    Join Date
    Dec 2007
    Posts
    62
    Plugin Contributions
    0

    Default Re: adding field to database for product listing

    I have added
    case 'PRODUCT_REF_NO':
    $lc_text = TABLE_HEADING_REF; //TABLE_HEADING_REF="Ref No."
    $lc_align = '';
    $zc_col_count_description++;
    break;
    at line no. 29

    case 'PRODUCT_REF_NO':
    $lc_align= '';
    $lc_text = $listing->fields['products_ref'];
    break;
    at line no. 100

    But could not display the reference no. on product listing

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: adding field to database for product listing

    Look to the tpl files for display...

    the file you edited only makes the info available

  5. #5
    Join Date
    May 2007
    Location
    San Diego, CA
    Posts
    4
    Plugin Contributions
    0

    Default Re: adding field to database for product listing

    I'm having a similar problem. (note: I am using the "Column Layout Grid for Product Listing" module.) I tried to reverse engineer the product listing but I couldn't figure out how to display my new field.

    The "tpl_columnar_display.php" page appears to get all the content from the $list_box_contents array.

    $list_box_contests array appears to get the field list from $column_list.

    $column_list created from "includes/modules/pages/index/main_template_vars.php"

    And finally, I added a "case" statement under the "switch ($column_list[$col])" in
    "includes/modules/CUSTOM/product_listing.php"

    I was able to hack my way through but I did it by modifying some of the core files and hardcoded some values. (Not the best way to run things.)

    If someone has a cleaner process, please post your results!

    Thank you in advance.

 

 

Similar Threads

  1. v150 Adding Field to Catagory Product Listing
    By Dave224 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 21 Jul 2012, 08:48 PM
  2. check box instead of quantity field for product listing
    By wheelock in forum General Questions
    Replies: 2
    Last Post: 8 Apr 2011, 08:01 PM
  3. Adding custom field from specials table to product listing and product info
    By davale in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 19 Oct 2007, 06:19 AM
  4. Adding Subitle field to Product Listing
    By prophetben in forum Setting Up Categories, Products, Attributes
    Replies: 6
    Last Post: 25 Dec 2006, 05:06 AM
  5. Problem adding new field to product listing
    By rwoody in forum General Questions
    Replies: 1
    Last Post: 9 Oct 2006, 08:04 AM

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