Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Increase file name field adding new products?


cgchris99

Recommended Posts

Posted

What file is the add new products entry fields in?

 

I want the field width wider. It looks like it is in

admincategories.php

 

right under <?php echo TEXT_PRODUCTS_IMAGE; ?>

tep_draw_separator('pixel_trans.gif','24','15')

 

by increasing the 24 or the 15, will the field get wider?

 

Thanks

Posted

This as to be done in your database

 

The_Bear

Posted

Like i sais do that change in your database with phpmyadmin click the products_description table and change the default 64 to whatever you need

 

HTH

The_Bear

Posted

Ok the field is 64 but when you type on the screen you can only get 19 characters into the field before it scrolls.

 

So in order to get more than 19 characters viewable in the field, I have to inscrease the 64 to like 128? Seems odd that changing the length of a database field will have any effect on the display of an entry field.

Posted

In case someone else is looking for this answer. I found it after searching threw a few posts

 

function/html_output.php

 

// Output a form filefield

function tep_draw_file_field($name, $required = false) {

$field = tep_draw_input_field($name, '', 'size=60', $required, 'file');

 

return $field;

}

  • 3 years later...
Posted

Currently, I have the osCommerce default settings in the admin pages for "Products name".

--> I can use 64 characters (defined by "varchar(64)" in MySQL)

--> I can see 19 characters in the field when adding a new product, or when editing a new product.

 

I would like to increase the width of the entry field from 19 characters to 64 (or so..).

 

I have tried the solution in the posting above, but this does NOT have the effect on the "Products name" field! When applying the change above, then the total width of the SCREEN will get updated!

 

Can somebody help me, how can I increase the width of the entry-field for "Products name" in the admin pages?

 

Thanks!

  • 2 weeks later...
Posted

Short update:

 

When I change admin//includes/functions/html_output.php with:

 

// Output a form filefield

function tep_draw_file_field($name, $required = false) {

$field = tep_draw_input_field($name, '', 'size=60', $required, 'file');

 

return $field;

}

 

Then the input field for the 'Products Image' gets wider.

 

How can I apply this same effect for the 'Products name' field?

 

I hope somebody can help me with this change?! The current field-width of only 19 characters is very uncomfortable and many mistakes are made because the product-name is not completely visible in the admin screens.

Posted

It's solved for me!

 

In admin/categories.php

 

I've changed this:

 

<td class="main"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('products_name[' . $languages[$i]['id'] . ']', (isset($products_name[$languages[$i]['id']]) ? $products_name[$languages[$i]['id']] : tep_get_products_name($pInfo->products_id, $languages[$i]['id'])),'size="40" maxlength="64"'); ?></td>
  • 2 months later...
Posted

Thank you so much! I had been searching for a solution for hours ... !!!

 

I can't understand the the original length of this field ( tep_draw_input_field ) is so small and that there are not more comments in the script codes.

 

 

Kind regards

Juerg

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...