Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 22
  1. #11
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Input width size in Admin

    Sorry, I missed where you changed topics. :)

    You started out specifically asking about how to increase the size of Products Name. Then you changed it to be talking about completely NEW fields. So, that suggests that your problem is in your custom code.

    Is it possible that your custom programming is missing the code that tells it how long to make the fields?

    I just duplicated the products_model code, after creating fields f1 and f2 with size 32 and 64, and it displays fine:
    Code:
                <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . zen_draw_input_field('products_model', htmlspecialchars(stripslashes($pInfo->products_model), ENT_COMPAT, CHARSET, TRUE), zen_set_field_length(TABLE_PRODUCTS, 'products_model')); ?></td>
                <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . zen_draw_input_field('f1', htmlspecialchars(stripslashes($pInfo->f1), ENT_COMPAT, CHARSET, TRUE), zen_set_field_length(TABLE_PRODUCTS, 'f1')); ?></td>
                <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . '&nbsp;' . zen_draw_input_field('f2', htmlspecialchars(stripslashes($pInfo->f2), ENT_COMPAT, CHARSET, TRUE), zen_set_field_length(TABLE_PRODUCTS, 'f2')); ?></td>
    .

    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.

  2. #12
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

    Default Re: Input width size in Admin

    It is very much possible. I will give it try.
    Using Zen Cart 1.5.1

  3. #13
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

    Default Re: Input width size in Admin

    Thank you DrByte.

    I had it as
    Code:
    <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '13') . '&nbsp;' . zen_draw_input_field('f1', $pInfo->f1, ''); ?></td>
    so when I revised them to what you suggested, it expanded:
    the 32 character field to 30 characters input box and
    the 96 character field to 45 characters input box.


    Also Product Name shows only 45 characters instead of 64? Following is the code:
    PHP Code:
    <?php
        
    for ($i=0$n=sizeof($languages); $i<$n$i++) {
    ?>
              <tr>
                <td class="main"><?php if ($i == 0) echo TEXT_PRODUCTS_NAME?></td>
                <td class="main"><?php echo zen_image(DIR_WS_CATALOG_LANGUAGES $languages[$i]['directory'] . '/images/' $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' zen_draw_input_field('products_name[' $languages[$i]['id'] . ']'htmlspecialchars(isset($products_name[$languages[$i]['id']]) ? stripslashes($products_name[$languages[$i]['id']]) : zen_get_products_name($pInfo->products_id$languages[$i]['id']), ENT_COMPATCHARSETTRUE), zen_set_field_length(TABLE_PRODUCTS_DESCRIPTION'products_name')); ?></td>
              </tr>
    <?php
        
    }
    ?>
    It seems to limit them to a maximum of 45 characters!

    Any way to view all characters?
    Using Zen Cart 1.5.1

  4. #14
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Input width size in Admin

    Zen Cart is not limiting those fields. You'll see that the generated HTML is not doing the limiting.
    The browser is probably to blame. Or maybe you have some CSS rules that are limiting the displayed size.
    .

    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.

  5. #15
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

    Default Re: Input width size in Admin

    I will look around and will let you know if I discover anything. Thank you.
    Using Zen Cart 1.5.1

  6. #16
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

    Default Re: Input width size in Admin

    Another questions

    I have created an additional field in the zen_products called products_ship_info with the following attributes:
    Type: text
    Collattion: utf8_general_ci
    Null: Yes
    Default: NULL

    I can not get it to display properly in admin>Product Description. I am using the following in admin/includes/modules/product/collect_info.php :

    PHP Code:
    <?php
        
    for ($i=0$n=sizeof($languages); $i<$n$i++) {
    ?>
              <tr>
                <td class="main" valign="top"><?php echo 'Product Ship Info: ' ?></td>
                <td colspan="2"><table border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td class="main" width="25" valign="top"><?php echo zen_image(DIR_WS_CATALOG_LANGUAGES $languages[$i]['directory'] . '/images/' $languages[$i]['image'], $languages[$i]['name']); ?>&nbsp;</td>
                    <td class="main" width="100%"><?php echo zen_draw_textarea_field('products_ship_info[' $languages[$i]['id'] . ']''soft''100%''30'htmlspecialchars((isset($products_ship_info[$languages[$i]['id']])) ? stripslashes($products_ship_info[$languages[$i]['id']]) : zen_get_products_ship_info($pInfo->products_id$languages[$i]['id']), ENT_COMPATCHARSETTRUE));  ?></td>
                  </tr>
                </table></td>
              </tr>
    <?php
        
    }
    ?>
    When I load this the page breaks after displaying Product Ship Info: and error log shows the following:
    PHP Code:
    [03-Jul-2013 19:06:16 UTCPHP Fatal error:  Call to undefined function zen_get_products_ship_info() in path\Store\admin\includes\modules\product\collect_info.php on line 331 
    Line 331 is the beginning of the PHP code.
    .
    Using Zen Cart 1.5.1

  7. #17
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Input width size in Admin

    ? stripslashes($products_ship_info[$languages[$i]['id']]) : zen_get_products_ship_info($pInfo->products_id, $languages[$i]['id']), ENT_COMPAT, CHARSET, TRUE))
    Why are you using zen_get_products_ship_info( as a function?
    .

    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.

  8. #18
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

    Default Re: Input width size in Admin

    No I am trying to show the field products_ship_info, there is no function involved.

    I have added 3 other fields to the zen_products table, without any issues. The only difference here is products_ship_info field type here is text and the other 3 i added were varchar() type with different lengths.

    I wanted the products_ship_info to be an expandable text field, not limited by the number of characters. That is why i followed the products_description method to display the data in admin.
    Using Zen Cart 1.5.1

  9. #19
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

    Default Re: Input width size in Admin

    When I use:
    PHP Code:
    <td class="main"><?php echo 'Product Ship Info: '?></td>
    <td class="main"><?php echo zen_draw_separator('pixel_trans.gif''24''15') . '&nbsp;' zen_draw_input_field('products_ship_info',
     
    htmlspecialchars(stripslashes($pInfo->products_ship_info), ENT_COMPATCHARSETTRUE), zen_set_field_length(TABLE_PRODUCTS'products_ship_info')); ?></td>
    I get a 5 character input text box, but I need to display a text area under admin and finally in product_info_display.
    Last edited by Kevin205; 3 Jul 2013 at 08:51 PM.
    Using Zen Cart 1.5.1

  10. #20
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

    Default Re: Input width size in Admin

    Fixed it. I replaced zen_draw_input_field by zen_draw_textarea_field

    PHP Code:
    <td class="main"><?php echo 'Product Ship Info: '?></td>
    <td class="main"><?php echo zen_draw_separator('pixel_trans.gif''24''15') . '&nbsp;' zen_draw_textarea_field('products_ship_info',
     
    htmlspecialchars(stripslashes($pInfo->products_ship_info), ENT_COMPATCHARSETTRUE), zen_set_field_length(TABLE_PRODUCTS'products_ship_info')); ?></td>
    Thank you DrByte
    Using Zen Cart 1.5.1

 

 
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. v150 Change display-width of account input fields
    By mi16chap in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 8 May 2012, 12:41 PM
  2. size of input fields
    By luciano9876 in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 12 Feb 2011, 07:41 PM
  3. Change width of input boxes on login page
    By jeking in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 15 Mar 2010, 05:43 PM
  4. Text Area Input Size v1.2.6
    By jacque427 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 6 Mar 2007, 04:07 AM
  5. Increase Size of Input Boxes
    By jacque427 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 1 Mar 2007, 09:47 PM

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