Results 1 to 8 of 8
  1. #1
    Join Date
    Feb 2009
    Posts
    13
    Plugin Contributions
    0

    Default Add Hidden Field for Catalog Reference

    I'd like to add a field for all our products.
    Basically for internal use only (admin), non-public.
    We'd like to add 'Vendor Catalog/Page' info to our products.
    Basically to reference the Vendor Hardcopy Catalogs.

    I can import the Catalog information, but there doesn't seem
    to be an available field to import, that will remain hidden.
    It will be admin only, not displayed on the customer side.

    For example, we could look at Product ABC123, and
    also displayed would be Summer 2007, Page 125.
    We have confidential catalogs and can't display the information publicly. Just for internal reference only.

    Similar to how the ebay/amazon exporter mod created new fields. Any ideas? Is there an 'Add a field" mod out there?
    Thanks in advance.....

  2. #2
    Join Date
    Sep 2004
    Location
    Western Massachusetts
    Posts
    2,945
    Plugin Contributions
    5

    Default Re: Add Hidden Field for Catalog Reference

    I'm not aware of any 'add a field' type module, but what you want to do is not difficult to achieve. First you need to modify the the database to add the new field(s), then you need to modify the admin product edit page (admin/includes/modules/product/collect_info.php) so you can enter and display the details. Finally you need to modify admin/includes/modules/update_product.php to actually enter the data into the new database field(s).
    Neville
    An assumption is what you arrive at when you get tired of thinking...

  3. #3
    Join Date
    Mar 2006
    Location
    Florence, Italy
    Posts
    153
    Plugin Contributions
    0

    Default Re: Add Hidden Field for Catalog Reference

    I've added a field named "volume" to the admin section in this way:

    1) In the table "products" of database with phpMyAdmin add he field
    products_volume varchar(32) yes NULL

    2) In admin/includes/languages/your language/product.php add
    define('TEXT_PRODUCTS_VOLUME', 'Volume:');

    3) In admin/includes/modules/product/collect_info.php modify the array near row 42 (after master_categories_id' => '')
    'products_volume' => ''

    4) Modify the select of the database (near row 59 after p.master_categories_id ) adding
    p.products_volume

    5) Show the field and his content where you wish (I've putted near row 434, after the <tr> related to the model)
    <tr>
    <td class="main"><?php echo TEXT_PRODUCTS_VOLUME; ?></td>
    <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' '. zen_draw_input_field('products_volume', $pInfo->products_volume, zen_set_field_length(TABLE_PRODUCTS, 'products_volume')); ?></td>
    </tr>

    7) For editing the data, insert in admin/includes/modules/update_product.php (near row 53 - after products_price_sorter)
    'products_volume' => zen_db_prepare_input($_POST['products_volume'])

    8) Last change, in
    admin/includes/modules/product/preview_info.php
    (near row 26 - after p.products_sort_order) add
    p.products_volume

    Giovanni

  4. #4
    Join Date
    Feb 2009
    Posts
    13
    Plugin Contributions
    0

    Default Re: Add Hidden Field for Catalog Reference

    Terrific.
    I'd like to thank you both for your replies.
    In my case, having it spelled out in '8-Easy Steps' is Perfect.
    I couldn't have asked for more. I can tweak from there.
    I would think others will benefit from your posts as well !!

  5. #5
    Join Date
    Dec 2009
    Location
    Halifax Canada
    Posts
    19
    Plugin Contributions
    0

    Default Re: Add Hidden Field for Catalog Reference

    Hi i know this is a old thread but I have moded the above code so that I could add 4 Vendor sections to my product so that I would know know just in the admin what vendor's I could get said product from & cost.

    what I want to do next is add a section just to show the data from thoughts sections to the categories.php file so that without going into the product I could see my vendor list I would prefer to have it listed under the category /product column of the file.

    any suggestions???

  6. #6
    Join Date
    Dec 2009
    Location
    Halifax Canada
    Posts
    19
    Plugin Contributions
    0

    Default Re: Add Hidden Field for Catalog Reference

    Maybe I did not explain well enough in case somebody looks at this
    the category page that shows all the products in that section.
    I what to add my list of vendors:
    1.vendor 1
    2.vendor 2
    3. vendor 3
    4. vendor 4

    I would like to appear under the Categories / Products section of a main category in this column ID Categories / Products just underneath it like this:
    ID Categories / Products
    299 Product A /model / Price/ QTY/ Green button
    Vendor 1 abc $28.00
    Vendor 2 zyz $33.00
    Vendor 3
    Vendor 4

    the Product in Category where you add product info I have added the vendor 1 vendor 2 ect just below the Qty box

    I used the above code modded it for what I needed it for it works great but not being a full coder still learning what do I have to do to it to show up on the Categories.php page??
    Suggestions
    Questions?

  7. #7
    Join Date
    Dec 2009
    Location
    Halifax Canada
    Posts
    19
    Plugin Contributions
    0

    Default Re: Add Hidden Field for Catalog Reference

    sorry to be bumping a topic but I really could use a pointer here on this one.

  8. #8
    Join Date
    Dec 2009
    Location
    Halifax Canada
    Posts
    19
    Plugin Contributions
    0

    Default Re: Add Hidden Field for Catalog Reference

    nobody I hate editing core files & don't want to mess up cart

 

 

Similar Threads

  1. Reference Help on Online Catalog
    By merlin123 in forum Basic Configuration
    Replies: 0
    Last Post: 18 Aug 2011, 07:26 PM
  2. I'd like to add an hidden field in the zen_redirect function
    By g.nencini in forum General Questions
    Replies: 1
    Last Post: 8 Apr 2009, 07:04 AM
  3. Need to make Country a hidden field...
    By nomaad in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 17 Apr 2007, 11:19 PM

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