Results 1 to 10 of 22

Hybrid View

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

    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.

  2. #2
    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

  3. #3
    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

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

    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.

  5. #5
    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

  6. #6
    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

  7. #7
    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

 

 

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

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