Page 1 of 3 123 LastLast
Results 1 to 10 of 29
  1. #1
    Join Date
    Apr 2011
    Posts
    91
    Plugin Contributions
    0

    Default New / Custom Extra Product Fields

    I've been searching the forum (and plugins) for close to 2 weeks now, and my head's ready to burst.

    It's hard for a newer Zencart admin to sort through everything due to the overwhelming quantity of posts.

    So much was written for 13x and I don't know / cannot find if that's what to do for 151.

    The thing that I'm trying to do right now is add custom fields to my cvs txt file to import with EP4 (no options, no attributes), and have displayed on the front end.

    example:

    v_products_height, v_products_width, v_products_compatible

    I could merge my height and width fields together and use the plugin Product Extra Fields v151 since this plugin only adds 1 text field (according to the description). I have to pdfs, no flash files, and no links to add.

    I DID see the Numinix plugin, BUT, like many others apperently, I am lost in the installation instructions (I did install a picaflor-azul template a-ok easy as pie. It's got clear install instructions, and EP4, as it too has easy install instructions).

    Neither a google search, nor this forum, nor numinix's site doesn't explain the install clearly.

    So basically I'm asking for someone who installed the Numinix plugin to list their install steps AND/OR a link to a mod for adding fields.

    BOTH appear in a TON of posts without answers, or from 2009, for example, for a complex code/file mod which leaves newer 151 users stumped.
    Zen Cart 1.5.3, Database Patch Level: 1.5.3
    Server OS: Linux 2.6.32, Database: MySQL 5.5.41
    HTTP Server: Apache, PHP Version: 5.4.37

  2. #2
    Join Date
    Dec 2011
    Location
    Wisconsin, USA
    Posts
    674
    Plugin Contributions
    21

    Default Re: v151 New / Custom Extra Product Fields

    The biggest portion of the numinix product fields that can be confusing, is it consists of 3 basic directories in the module files.

    1.) The module itself in the Catalog directory
    2.) The "pre-built" optional fields for the admin in the optional_fields directory
    3.) The optional fields for the catalog side, in the optional_catalog directory

    Quick and basic steps for installing the module
    1.) Backup Files and DB
    2.) Copy the files in the catalog/admin directory to your whatever admin directory maybe? public_html/zcadmin
    3.) Copy the module_version directory to you store directory. public_html?
    4.) In the Admin go to tools-> Install SQL Patches select the install.sql file included in the package.

    To install one of the fields.
    1.) Copy the files from the admin directory for that field to your admin directory
    2.) Run the Install.sql for that field

    If you choose you choose to add the fields to your catalog too, i would recommend merging (line comparison) between the modules sample files and your sites, files as the templates are more then likely different.

    Does that make more sense?

    I would say this install is of a moderate complexity if you haven't installed very many modules. There are many developers are there that can install this for you fairly quickly if need be. If you don't feel comfortable installing this i would recommend spending the few $$ to have someone familiar with this module to help you out. However you will need to look outside the forum as this isn't a place to advertise or seek those services.
    Last edited by bislewl; 25 Jun 2014 at 06:41 PM. Reason: spelling

  3. #3
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,740
    Plugin Contributions
    22

    Default Re: v151 New / Custom Extra Product Fields

    Last time I used Numinix Product Fields was a few years ago, but the installation is pretty straight-forward.

    There's a required part -just go over all files and, if those files already exist on your server, carefully merge the changes. If not, just upload the files preserving folder structure.
    As for the optional part - do the same and just merge the changes with already existing files.

    And, re: your search... Hehe... The one you mention from 2009 must be this. Unfortunately, it's perfectly correct and not much has changed. The only thing YOU would need to be careful about is the fact that you can't use a new table, but would instead need to add your new fields into the products table (which actually simplifies the process a bit). If you use a separate table, you won't be able to use EP4 with those fields.

  4. #4
    Join Date
    Apr 2011
    Posts
    91
    Plugin Contributions
    0

    Default Re: v151 New / Custom Extra Product Fields

    Actually I wrote 2009 (webego thread), but I was thinking of 2007 (crazy_chris thread). I decided not to try the numinix, and instead edited files... WITHOUT complete success, but some success. Here is what I did so far:

    http://www.zen-cart.com/showthread.p...-your-Products
    http://www.zen-cart.com/showthread.p...y-listing-page


    THE SHORT LIST:

    1.Admin>Tools>Install SQL Patches
    ALTER TABLE `products` ADD `products_newfield` TEXT;

    2. Edit "/admin/includes/modules/product/collect_info.php".

    2a. After "$parameters = array", add to list with others:
    'products_newfield' => '',

    2b. After "$product = $db->Execute("select"," , add to list with others:
    p.products_newfield

    2c. Add the input fields in the product-mask, in area with other add:

    <tr>
    <td class="main"><?php echo TEXT_PRODUCT_NOTES; ?></td>
    <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . zen_draw_input_field('products_newfield', $pInfo->products_newfield); ?></td>
    </tr>
    <tr>
    <td colspan="2"><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
    </tr>

    3. Edit "/admin/includes/modules/product/preview_info.php"

    After "$product = $db->Execute("select", add to list with others:
    p.products_newfield

    4. Edit "/admin/includes/modules/update_product.php"
    After "$sql_data_array = array(", add to list with others:
    'products_newfield' => zen_db_prepare_input($_POST['products_newfield']),

    QUESTION QUESTION for #4: Shoud I also add after "// Data-cleaning to prevent MySQL5 data-type mismatch errors:" with the others:
    $tmp_value = zen_db_prepare_input($_POST['products_newfield']);
    $products_newfield = (!zen_not_null($tmp_value) || $tmp_value=='' || $tmp_value == 0) ? 0 : $tmp_value;

    5. Edit "/includes/modules/pages/product_info/main_template_vars.php"

    After "$sql = "select", add to list with others:
    p.products_newfield

    Also added to the list with the others:
    $products_newfield = $product_info->fields['products_newfield'];


    Then also with the others after "// build show flags from product type layout settings", I added:

    $flag_show_product_info_newfield = zen_get_show_product_switch($_GET['products_id'], 'newfield');


    6. Edit "/includes/templates/MYTEMPLATE/templates/tpl_product_info_display.php

    <?php echo (($flag_show_product_info_newfield == 1) ? '<li>' . $products_notes . TEXT_PRODUCT_NEWFIELD . '</li>' : '') . "\n"; ?>

    QUESTION QUESTION #6: The above does not work (I see "(bullet point) 100.101TEXT_PRODUCT_NEWFIELD"), but below does:
    <!--bof product newfield -->
    <?php if ($products_newfield != '') {
    ?>
    <div class="productGeneral"><li>Newfield:<?php echo $products_newfield; ?></li></div>
    <?php
    }
    ?>
    <!--eof product newfield -->

    Also works:
    <?php if (!empty($product_info->fields['products_newfield'])) echo $product_info->fields['products_newfield']; ?>

    7. Edit "/includes/languages/english/YOUR_TEMPLATE/index.php"

    define('TABLE_HEADING_NEWFIELD', 'Newfield');

    8. Edit "/includes/modules/pages/index/main_template_vars.php

    (under "// create column list $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,")
    'PRODUCT_LIST_NEWFIELD' => PRODUCT_LIST_NEWFIELD,

    case 'PRODUCT_LIST_NEWFIELD':
    $select_column_list .= 'p.products_newfield, ';
    break;

    9. Edit "/includes/modules/YOUR_TEMPLATE/product_listing.php", and add:

    case 'PRODUCT_LIST_NEWFIELD':
    $lc_text = TABLE_HEADING_NEWFIELD;
    $lc_align = '';
    $zc_col_count_description++;
    break;

    10. Edit "/includes/index_filters/default_filter.php", and add to "$select_column_list" (4 different times):

    p.products_newfield,

    case 'PRODUCT_LIST_NEWFIELD':
    $listing_sql .= " order by p.products_newfield " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
    break;


    11. Insert into configuration:

    ?????????????????????

    I messed up my table somehow. Basically what happened is that the thread listed:

    insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Display Product Newfield', 'PRODUCT_LIST_NEWFIELD, '4', 'Do you want to display the Product Newfield', 8, 5, now());

    BUT, I received an error, so I went into phpmyadmin, exported the configuration table as cvs, opened it in open office, inserted row around 212, copied and pasted similar row and edited it to "newfield", and imported the cvs into phpmyadmin (deleting original during the import).

    NOW I SEE THE NEWFIELD IN ADMIN, BUT in admin>configuration>product listing when I click on edit, no text box appears on the right. I can click on update, then the value changes from 3(3 for example) to blank ( for example) for ANY AND ALL in this admin>configuration>product listing area. Here's an example of a row from the cvs file:

    212,"Display Product Image","PRODUCT_LIST_IMAGE",1,"Do you want to display the Product Image?",8,1,"2014-07-03 07:51:01","2009-05-30 08:43:46","NULL","NULL"

    218,"Display Product Newfield","PRODUCT_LIST_NEWFIELD",3,"Do you want to display the Product Newfield?",8,7,"NULL","2009-05-30 08:43:46","NULL","NULL"

    So, that is a BIG problem.

    2nd problem, the product listing added the newfield, but like this when nothing is in that field for a product:

    0

    And like this when the value I entered is MEMEMEM:

    MEMEMEM

    So, 2nd issue really is to stop showing "0" when empty.

    And 3rd problem is that on the individual product page it shows:

    MEMEMEMTEXT_PRODUCT_NEWFIELD
    Last edited by stiggybaby; 4 Jul 2014 at 06:58 PM.
    Zen Cart 1.5.3, Database Patch Level: 1.5.3
    Server OS: Linux 2.6.32, Database: MySQL 5.5.41
    HTTP Server: Apache, PHP Version: 5.4.37

  5. #5
    Join Date
    Apr 2011
    Posts
    91
    Plugin Contributions
    0

    Default Re: v151 New / Custom Extra Product Fields

    Sorry, I was sooo involved in these file edits and trying to get zencart setup, that I completely forgot my manners...

    Thank you both bislewl, and balihr for your replies, and if you have any further direction in helping me out with any or part of the above, it would be greatly appreciated. PLUS, I really want to have a more complete thread on this issue with a FINALIZED 1.5.1 step-by-step so people don't have to google their way for days and days through tons and tons of posts, only to not get the issue solved.

    I've read about several other sellers, like myself, of different parts, where extra fields are an absolute MUST due to the type of product and customer needs.
    Zen Cart 1.5.3, Database Patch Level: 1.5.3
    Server OS: Linux 2.6.32, Database: MySQL 5.5.41
    HTTP Server: Apache, PHP Version: 5.4.37

  6. #6
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,371
    Plugin Contributions
    23

    Default Re: v151 New / Custom Extra Product Fields

    Hmm, the apsona shop manager is free and is a lot easier to use than the ezpopulate. Fields added to the product table automatically get included.
    http://apsona.com/pages/ec/signup.html

    Additionally, I wrote the extra product fields mod - it uses a different table because it had the possibility of adding many fields and I wanted to keep that info separated out of the products table.

    I've thought about a new version since that one was actually written more to include a flash file on the product page and that's probably not happening anymore. At least I hope so.

    So perhaps it would be best to rewrite the mod to include upload maybe 2 PDFs (the other reason for the mod) and several text fields. Connect them to the product table instead and that would have solved your problem, correct?
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

  7. #7
    Join Date
    Apr 2011
    Posts
    91
    Plugin Contributions
    0

    Default Re: v151 New / Custom Extra Product Fields

    Quote Originally Posted by delia View Post
    ...So perhaps it would be best to rewrite the mod to include upload maybe 2 PDFs (the other reason for the mod) and several text fields. Connect them to the product table instead and that would have solved your problem, correct?
    YES, YES, YES!!!!

    From what I have read from several dozen posts on the forum that would help ALL of us parts type of stores (plus have the extra fields searchable, so customers can find the part they need easily would be a big bonus too).
    Zen Cart 1.5.3, Database Patch Level: 1.5.3
    Server OS: Linux 2.6.32, Database: MySQL 5.5.41
    HTTP Server: Apache, PHP Version: 5.4.37

  8. #8
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,371
    Plugin Contributions
    23

    Default Re: v151 New / Custom Extra Product Fields

    Searchable is a whole 'nother thing. Though maybe if this was all pulled into the product table, that would take care of itself.

    I'm updating the mod now for zc v1.5.3 but making a change like that in tables is major. I'm just going to upload this one with the small change and do another version that changes majorly. I'll let you know when I have a the fully revised mod ready.
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

  9. #9
    Join Date
    Apr 2011
    Posts
    91
    Plugin Contributions
    0

    Default Re: v151 New / Custom Extra Product Fields

    Quote Originally Posted by delia View Post
    Searchable is a whole 'nother thing. Though maybe if this was all pulled into the product table, that would take care of itself...
    Yep!

    Quote Originally Posted by delia View Post
    I'm updating the mod now for zc v1.5.3 but making a change like that in tables is major. I'm just going to upload this one with the small change and do another version that changes majorly. I'll let you know when I have a the fully revised mod ready.
    SUH! - WHEAT! Sweet!
    Zen Cart 1.5.3, Database Patch Level: 1.5.3
    Server OS: Linux 2.6.32, Database: MySQL 5.5.41
    HTTP Server: Apache, PHP Version: 5.4.37

  10. #10
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: v151 New / Custom Extra Product Fields

    In general I'd recommend not altering the "products" table directly, if at all possible, mostly to make things easier for upgrades.
    Then adapt the search code to include your additional tables' relevant fields if search is a required component to specific fields you're adding.
    .

    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.

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. product extra fields
    By lions1855 in forum General Questions
    Replies: 6
    Last Post: 24 Mar 2010, 02:14 PM
  2. show custom product fields on new and all product pages
    By crl in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 1 Oct 2007, 05:04 AM
  3. Product Extra Fields
    By webie in forum Customization from the Admin
    Replies: 0
    Last Post: 23 Sep 2007, 07:16 PM
  4. What's the easiest way to add custom fields to the New Product page?
    By christopherw in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 18 Sep 2007, 06:16 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