Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Sep 2011
    Posts
    226
    Plugin Contributions
    0

    Default Add extra info fields when adding products

    Hi

    I want an extra field called "Product ID" when adding new products using the admin panel. This "Product ID" field will be used to identify which supplier I obtain that specific product from. I need this extra field because I may get that same product from different suppliers, and these suppliers' prices differ, and thus I need to know which supplier I get that product from.

    If you go to one of my product pages:
    pcselect.co.za/index.php?main_page=product_info&cPath=176_178&products_id=341

    ...you will see, under the price:

    Model: NVU6HZA
    Please call us to check stock
    Manufactured by: Lenovo
    ##################################################

    I want that extra field to be like this:

    Model: NVU6HZA
    Product ID: S01_444
    Please call us to check stock
    Manufactured by: Lenovo

    ##################################################

    I don't need the extra field to be anything fancy, just a plan text area where I can enter in the supplier code.

    Thank you for your help.

    Kind regards
    S

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,269
    Plugin Contributions
    3

    Default Re: Add extra info fields when adding products

    Numinix.com has a mod for extra product fields. There is a wide range of extra field choices. Excellent mod - strongly recommend Numinix's mods - very well-written and zen-friendly.
    20 years a Zencart User

  3. #3
    Join Date
    Sep 2011
    Posts
    226
    Plugin Contributions
    0

    Default Re: Add extra info fields when adding products

    Quote Originally Posted by schoolboy View Post
    Numinix.com has a mod for extra product fields. There is a wide range of extra field choices. Excellent mod - strongly recommend Numinix's mods - very well-written and zen-friendly.
    Thanks for the referral. I installed the mod, but I've obviously done something wrong. I installed everything to the file tree. When I tried to add a new product in admin, my chosen option showed, which was SKU (Product condition showed as well for some reason). I entered the SKU, and saved the product, but when I went to the product on my website, I get this error:

    pcselect.co.za/index.php?main_page=product_info&cPath=319&products_id=574

    I did add the SKU to my tpl_product_info_display.php and installed both SQLs.

    I did not, however, recognize the npf_includes (etc) in my default Zen-Cart file tree, so I just copied those folders in.

    Thank you for your help.

    Kind regards
    S

  4. #4
    Join Date
    Sep 2011
    Posts
    226
    Plugin Contributions
    0

    Default Re: Add extra info fields when adding products

    I found the line that was seeming to cause the problem, in /includes/modules/pages/product_info/header_php.php

    PHP Code:
      // build query
      
    $products_query "SELECT p.products_weight, pd.products_description2" $npf_attributes 
    I removed 'pd.products_description2" from that line, and the page loaded, but without the SKU, which I had installed. I have entered the line into tpl_product_info_display.php, so I can't figure out what it could be.

    Help is appreciated.

    Thanks
    S

  5. #5
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,269
    Plugin Contributions
    3

    Default Re: Add extra info fields when adding products

    There is no need to play with code, unless the README files instruct this.

    As there are various field options available, Numinix has SPLIT these out from the base installation. Once you have done the basic install of the mod, you need to go into the other folder to select which field options are appropriate for your needs.

    So there is a "two-tier" installation process for this mod
    20 years a Zencart User

  6. #6
    Join Date
    Sep 2011
    Posts
    226
    Plugin Contributions
    0

    Default Re: Add extra info fields when adding products

    Quote Originally Posted by schoolboy View Post
    There is no need to play with code, unless the README files instruct this.

    As there are various field options available, Numinix has SPLIT these out from the base installation. Once you have done the basic install of the mod, you need to go into the other folder to select which field options are appropriate for your needs.

    So there is a "two-tier" installation process for this mod
    Oh, ok. I will give it another try.

    I can't overwrite my tpl_product_info_display.php file as it is heavily customized. Should I just add in the php echo SKU line under product details, without overwriting?


    Also, there are 3 folder:

    catalog
    optional_catalog
    optional_fields

    Is the basic install the contents of the catalog folder? And then from there do I pick the field I want from optional_fields?
    Thanks again for your help.

    S
    Last edited by SethF; 19 Nov 2011 at 12:43 PM. Reason: Added text.

  7. #7
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,269
    Plugin Contributions
    3

    Default Re: Add extra info fields when adding products

    Quote Originally Posted by SethF View Post
    Oh, ok. I will give it another try.

    I can't overwrite my tpl_product_info_display.php file as it is heavily customized. Should I just add in the php echo SKU line under product details, without overwriting?
    Then you need to "blend" your file with this nodule's file, bringing in any required code.

    Quote Originally Posted by SethF View Post
    Also, there are 3 folder:

    catalog
    optional_catalog
    optional_fields

    Is the basic install the contents of the catalog folder? And then from there do I pick the field I want from optional_fields?
    Thanks again for your help.

    S
    Basically, yes... the OPTIONAL folders contain the various fields, and you then install these in the "second tier".
    20 years a Zencart User

  8. #8
    Join Date
    Sep 2011
    Posts
    226
    Plugin Contributions
    0

    Default Re: Add extra info fields when adding products

    Quote Originally Posted by schoolboy View Post
    Then you need to "blend" your file with this nodule's file, bringing in any required code.



    Basically, yes... the OPTIONAL folders contain the various fields, and you then install these in the "second tier".
    Alright, I installed everything correctly. I only installed the SKU and dimension field.

    I tried to add these to the tpl_product_info_display.php but they refuse to show.

    Here is what my Product Details section of my tpl_product_info_display.php looks like:

    PHP Code:
    <!--bof Product details list  -->
    <?php //if ( (($flag_show_product_info_model == 1 and $products_model != '') or ($flag_show_product_info_weight == 1 and $products_weight !=0) or ($flag_show_product_info_quantity == 1) or ($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name))) ) { ?>
    <ul id="productDetailsList" class="floatingBox back">
    <!--bof Add to Cart Box -->
    <?php
    if (CUSTOMERS_APPROVAL == and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') {
      
    // do nothing
    } else {
    ?>
                <?php
        $display_qty 
    = (($flag_show_product_info_in_cart_qty == and $_SESSION['cart']->in_cart($_GET['products_id'])) ? '<p>' PRODUCTS_ORDER_QTY_TEXT_IN_CART $_SESSION['cart']->get_quantity($_GET['products_id']) . '</p>' '');
                if (
    $products_qty_box_status == or $products_quantity_order_max== 1) {
                  
    // hide the quantity box and default to 1
                  
    $the_button '<input type="hidden" name="cart_quantity" value="1" />' zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CARTBUTTON_IN_CART_ALT);
                } else {
                  
    // show the quantity box
        
    $the_button PRODUCTS_ORDER_QTY_TEXT '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="4" /><br />' zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '<br />' zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CARTBUTTON_IN_CART_ALT);
                }
        
    $display_button zen_get_buy_now_button($_GET['products_id'], $the_button);
      
    ?>
      <?php if ($display_qty != '' or $display_button != '') { ?>
        <div id="cartAdd">
        <?php
          
    echo $display_qty;
          echo 
    $display_button;
                
    ?>
              </div>
      <?php // display qty and button ?>
    <?php 
    // CUSTOMERS_APPROVAL == 3 ?>
    <!--eof Add to Cart Box-->
    <!--bof Product Price block -->
    <h2 id="productPrices" class="productGeneral">
    <?php
    // base price
      
    if ($show_onetime_charges_description == 'true') {
        
    $one_time '<span >' TEXT_ONETIME_CHARGE_SYMBOL TEXT_ONETIME_CHARGE_DESCRIPTION '</span><br />';
      } else {
        
    $one_time '';
      }
      echo 
    $one_time . ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == 1) ? TEXT_BASE_PRICE '') . zen_get_products_display_price((int)$_GET['products_id']);
    ?></h2>
    <!--eof Product Price block -->
    <!--Report a Price -->
       <div id="reportPrice" class="biggerText">
       <?php echo '<a href="' zen_href_link(FILENAME_REPORT_A_PRICE'products_id='
       
    $_GET['products_id']) . '">' .
       
    zen_image_button(BUTTON_IMAGE_REPORT_A_PRICEBUTTON_REPORT_A_PRICE_ALT) .
       
    '</a>'?></div>
       
       
       <!--Report a Price -->
      <?php echo (($flag_show_product_info_model == and $products_model !='') ? '<li><span class="product-info-label">' TEXT_PRODUCT_MODEL '</span>' $products_model '</li>' '') . "\n"?>
      <?php echo (($flag_show_product_info_weight == and $products_weight !=0) ? '<li><span class="product-info-label">' TEXT_PRODUCT_WEIGHT '</span>' .  $products_weight TEXT_PRODUCT_WEIGHT_UNIT '</li>'  '') . "\n"?>
      <li><strong><span style="color: #a11f1f;">Please&nbsp;</span><a onclick="window.open('/index.php?main_page=contact_us','Contact us for the most up-to-date stock and pricing information.','scrollbars=yes,resizable=yes,width=860,height=900,left='+(screen.availWidth/2-430)+',top='+(screen.availHeight/2-450)+'');return false;" rel="help" href="/index.php?main_page=contact_us"><span style="color: #a11f1f;">call us</span></a><span style="color: #a11f1f;">&nbsp;to check stock</span></strong>
    </li>
      <?php echo (($flag_show_product_info_manufacturer == and !empty($manufacturers_name)) ? '<li><span class="product-info-label">' TEXT_PRODUCT_MANUFACTURER '</span>' $manufacturers_name '</li>' '') . "\n"?>

    </ul>
    <br class="clearBoth" />
    <?php
      
    }
    ?>
    <!--eof Product details list -->

    ------------------------------------------------

    Here is what I have to add:

    PHP Code:
    <!--bof Product details list  -->
    <?php //if ( (($flag_show_product_info_model == 1 and $products_model != '') or ($flag_show_product_info_weight == 1 and $products_weight !=0) or ($flag_show_product_info_quantity == 1) or ($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name))) ) { ?>
    <?php 
    if ( (($flag_show_product_info_model == and $products_model != '') or ($flag_show_product_info_weight == and $products_weight !=0) or ($flag_show_product_info_quantity == 1) or ($flag_show_product_info_dimensions == 1) or ($flag_show_product_info_condition == 1) or ($flag_show_product_info_upc == 1) or ($flag_show_product_info_isbn == 1) or ($flag_show_product_info_manufacturer == and !empty($manufacturers_name))) ) { ?> 
    <ul id="productDetailsList" class="floatingBox back">
      <?php echo (($flag_show_product_info_model == and $products_model != '') ? '<li>' TEXT_PRODUCT_MODEL $products_model '</li>' '') . "\n"?>
      <?php echo (($flag_show_product_info_weight == and $products_weight != 0) ? '<li>' $products_weight_display '</li>'  '') . "\n"?>
      <?php echo (($flag_show_product_info_actual_weight == and $products_actual_weight != 0) ? '<li>' $products_actual_weight_display '</li>'  '') . "\n"?>
      <?php echo (($flag_show_product_info_dimensions == && ($products_length != || $products_width != || $products_height != 0)) ? '<li>' $products_dim_display '</li>'  '') . "\n"?> 
      <?php echo (($flag_show_product_info_diameter == && $products_diameter != '') ? '<li>' $products_diameter_display '</li>'  '') . "\n"?>   
      <?php echo (($flag_show_product_info_quantity == 1) ? '<li>' $products_quantity TEXT_PRODUCT_QUANTITY '</li>'  '') . "\n"?>
      <?php echo (($flag_show_product_info_manufacturer == and !empty($manufacturers_name)) ? '<li>' TEXT_PRODUCT_MANUFACTURER $manufacturers_name '</li>' '') . "\n"?>
      <?php echo (($flag_show_product_info_condition == and $products_condition != '') ? '<li>' TEXT_PRODUCTS_CONDITION $products_condition '</li>' '') . "\n"?>
      <?php echo (($flag_show_product_info_upc == and $products_upc != '') ? '<li>' TEXT_PRODUCTS_UPC $products_upc '</li>' '') . "\n"?>  
      <?php echo (($flag_show_product_info_isbn == and $products_isbn != '') ? '<li>' TEXT_PRODUCTS_ISBN $products_isbn '</li>' '') . "\n"?>
      <?php echo (($flag_show_product_info_sku == and $products_sku != '') ? '<li>' TEXT_PRODUCTS_SKU $products_sku '</li>' '') . "\n"?>
    </ul>
    <br class="clearBoth" />
    <?php
      
    }
    ?>
    <!--eof Product details list -->
    --------------------------------------------
    ...but of coarse only adding the SKU and Dimensions entries.

    Everything is currently installed on my website, so please go onto this product page:

    pcselect.co.za/index.php?main_page=product_info&cPath=319&products_id=576


    I am really struggling with this one. Your help is very appreciated.

    Thank you

    Kind regards
    S

  9. #9
    Join Date
    Sep 2011
    Posts
    226
    Plugin Contributions
    0

    Default Re: Add extra info fields when adding products

    Quote Originally Posted by SethF View Post
    Alright, I installed everything correctly. I only installed the SKU and dimension field.

    I tried to add these to the tpl_product_info_display.php but they refuse to show.

    Here is what my Product Details section of my tpl_product_info_display.php looks like:

    PHP Code:
    <!--bof Product details list  -->
    <?php //if ( (($flag_show_product_info_model == 1 and $products_model != '') or ($flag_show_product_info_weight == 1 and $products_weight !=0) or ($flag_show_product_info_quantity == 1) or ($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name))) ) { ?>
    <ul id="productDetailsList" class="floatingBox back">
    <!--bof Add to Cart Box -->
    <?php
    if (CUSTOMERS_APPROVAL == and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') {
      
    // do nothing
    } else {
    ?>
                <?php
        $display_qty 
    = (($flag_show_product_info_in_cart_qty == and $_SESSION['cart']->in_cart($_GET['products_id'])) ? '<p>' PRODUCTS_ORDER_QTY_TEXT_IN_CART $_SESSION['cart']->get_quantity($_GET['products_id']) . '</p>' '');
                if (
    $products_qty_box_status == or $products_quantity_order_max== 1) {
                  
    // hide the quantity box and default to 1
                  
    $the_button '<input type="hidden" name="cart_quantity" value="1" />' zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CARTBUTTON_IN_CART_ALT);
                } else {
                  
    // show the quantity box
        
    $the_button PRODUCTS_ORDER_QTY_TEXT '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="4" /><br />' zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '<br />' zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CARTBUTTON_IN_CART_ALT);
                }
        
    $display_button zen_get_buy_now_button($_GET['products_id'], $the_button);
      
    ?>
      <?php if ($display_qty != '' or $display_button != '') { ?>
        <div id="cartAdd">
        <?php
          
    echo $display_qty;
          echo 
    $display_button;
                
    ?>
              </div>
      <?php // display qty and button ?>
    <?php 
    // CUSTOMERS_APPROVAL == 3 ?>
    <!--eof Add to Cart Box-->
    <!--bof Product Price block -->
    <h2 id="productPrices" class="productGeneral">
    <?php
    // base price
      
    if ($show_onetime_charges_description == 'true') {
        
    $one_time '<span >' TEXT_ONETIME_CHARGE_SYMBOL TEXT_ONETIME_CHARGE_DESCRIPTION '</span><br />';
      } else {
        
    $one_time '';
      }
      echo 
    $one_time . ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == 1) ? TEXT_BASE_PRICE '') . zen_get_products_display_price((int)$_GET['products_id']);
    ?></h2>
    <!--eof Product Price block -->
    <!--Report a Price -->
       <div id="reportPrice" class="biggerText">
       <?php echo '<a href="' zen_href_link(FILENAME_REPORT_A_PRICE'products_id='
       
    $_GET['products_id']) . '">' .
       
    zen_image_button(BUTTON_IMAGE_REPORT_A_PRICEBUTTON_REPORT_A_PRICE_ALT) .
       
    '</a>'?></div>
       
       
       <!--Report a Price -->
      <?php echo (($flag_show_product_info_model == and $products_model !='') ? '<li><span class="product-info-label">' TEXT_PRODUCT_MODEL '</span>' $products_model '</li>' '') . "\n"?>
      <?php echo (($flag_show_product_info_weight == and $products_weight !=0) ? '<li><span class="product-info-label">' TEXT_PRODUCT_WEIGHT '</span>' .  $products_weight TEXT_PRODUCT_WEIGHT_UNIT '</li>'  '') . "\n"?>
      <li><strong><span style="color: #a11f1f;">Please&nbsp;</span><a onclick="window.open('/index.php?main_page=contact_us','Contact us for the most up-to-date stock and pricing information.','scrollbars=yes,resizable=yes,width=860,height=900,left='+(screen.availWidth/2-430)+',top='+(screen.availHeight/2-450)+'');return false;" rel="help" href="/index.php?main_page=contact_us"><span style="color: #a11f1f;">call us</span></a><span style="color: #a11f1f;">&nbsp;to check stock</span></strong>
    </li>
      <?php echo (($flag_show_product_info_manufacturer == and !empty($manufacturers_name)) ? '<li><span class="product-info-label">' TEXT_PRODUCT_MANUFACTURER '</span>' $manufacturers_name '</li>' '') . "\n"?>

    </ul>
    <br class="clearBoth" />
    <?php
      
    }
    ?>
    <!--eof Product details list -->

    ------------------------------------------------

    Here is what I have to add:

    PHP Code:
    <!--bof Product details list  -->
    <?php //if ( (($flag_show_product_info_model == 1 and $products_model != '') or ($flag_show_product_info_weight == 1 and $products_weight !=0) or ($flag_show_product_info_quantity == 1) or ($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name))) ) { ?>
    <?php 
    if ( (($flag_show_product_info_model == and $products_model != '') or ($flag_show_product_info_weight == and $products_weight !=0) or ($flag_show_product_info_quantity == 1) or ($flag_show_product_info_dimensions == 1) or ($flag_show_product_info_condition == 1) or ($flag_show_product_info_upc == 1) or ($flag_show_product_info_isbn == 1) or ($flag_show_product_info_manufacturer == and !empty($manufacturers_name))) ) { ?> 
    <ul id="productDetailsList" class="floatingBox back">
      <?php echo (($flag_show_product_info_model == and $products_model != '') ? '<li>' TEXT_PRODUCT_MODEL $products_model '</li>' '') . "\n"?>
      <?php echo (($flag_show_product_info_weight == and $products_weight != 0) ? '<li>' $products_weight_display '</li>'  '') . "\n"?>
      <?php echo (($flag_show_product_info_actual_weight == and $products_actual_weight != 0) ? '<li>' $products_actual_weight_display '</li>'  '') . "\n"?>
      <?php echo (($flag_show_product_info_dimensions == && ($products_length != || $products_width != || $products_height != 0)) ? '<li>' $products_dim_display '</li>'  '') . "\n"?> 
      <?php echo (($flag_show_product_info_diameter == && $products_diameter != '') ? '<li>' $products_diameter_display '</li>'  '') . "\n"?>   
      <?php echo (($flag_show_product_info_quantity == 1) ? '<li>' $products_quantity TEXT_PRODUCT_QUANTITY '</li>'  '') . "\n"?>
      <?php echo (($flag_show_product_info_manufacturer == and !empty($manufacturers_name)) ? '<li>' TEXT_PRODUCT_MANUFACTURER $manufacturers_name '</li>' '') . "\n"?>
      <?php echo (($flag_show_product_info_condition == and $products_condition != '') ? '<li>' TEXT_PRODUCTS_CONDITION $products_condition '</li>' '') . "\n"?>
      <?php echo (($flag_show_product_info_upc == and $products_upc != '') ? '<li>' TEXT_PRODUCTS_UPC $products_upc '</li>' '') . "\n"?>  
      <?php echo (($flag_show_product_info_isbn == and $products_isbn != '') ? '<li>' TEXT_PRODUCTS_ISBN $products_isbn '</li>' '') . "\n"?>
      <?php echo (($flag_show_product_info_sku == and $products_sku != '') ? '<li>' TEXT_PRODUCTS_SKU $products_sku '</li>' '') . "\n"?>
    </ul>
    <br class="clearBoth" />
    <?php
      
    }
    ?>
    <!--eof Product details list -->
    --------------------------------------------
    ...but of coarse only adding the SKU and Dimensions entries.

    Everything is currently installed on my website, so please go onto this product page:

    pcselect.co.za/index.php?main_page=product_info&cPath=319&products_id=576


    I am really struggling with this one. Your help is very appreciated.

    Thank you

    Kind regards
    S
    *bump*

    Could someone kindly guide me through the install process.
    I have really been puzzled at how this does not work.

    Note: I have a heavily modified tpl_product_info_display.php file. My headerphp.php file also exists, and I am not sure if the problem is being caused by me overwriting this file.

    Thank you for your help.

    Kind regards
    S

  10. #10
    Join Date
    Sep 2011
    Posts
    226
    Plugin Contributions
    0

    Default Re: Add extra info fields when adding products

    Sorry, but I'm bumping this up again.

    I really need this working, and don't want to spend an unnecessary $25 installation fee.

    Thanks in advance.

    S

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v155 How to Add Custom Fields for Materials & Dimensions when adding products?
    By wmorris in forum All Other Contributions/Addons
    Replies: 95
    Last Post: 27 Jul 2016, 08:36 AM
  2. v151 how to add extra fields to products / catogories
    By kitcorsa in forum General Questions
    Replies: 0
    Last Post: 16 Oct 2013, 01:05 PM
  3. Create Account - modify existing fields or add extra fields?
    By sopretty in forum General Questions
    Replies: 4
    Last Post: 30 Jul 2010, 08:26 PM
  4. Replies: 0
    Last Post: 25 Mar 2009, 06:54 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