Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Bigger input fields for products name in admin


mr_magnell

Recommended Posts

Posted

Is it possible to get bigger input fields for the products name in admin? I tried to find out how but im new to php and did not manage it.

 

please help as my products name is quite long and it's hard to see if i typed it correct when the input field is so short.

 

image2.jpg

Posted
Is it possible to get bigger input fields for the products name in admin? I tried to find out how but im new to php and did not manage it.

 

please help as my products name is quite long and it's hard to see if i typed it correct when the input field is so short.

 

image2.jpg

 

Your best bet is to put a small name for the product and use the description as a secondary name field and description of the product

Posted

mr_magnell, it is fairly easy to increase the size of these input fields - you only need to pass a width attribute to the function that "draws" them..

 

- open your admin/categories.php for editing

- find the following (should be around line 500):

<?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 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']]) ? stripslashes($products_name[$languages[$i]['id']]) : tep_get_products_name($pInfo->products_id, $languages[$i]['id']))); ?></td>
	  </tr>
<?php
}
?>

 

- add

, 'style="width: 380px"'

directly after : tep_get_products_name($pInfo->products_id, $languages[$i]['id'])) so that it looks like the following:

<?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 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']]) ? stripslashes($products_name[$languages[$i]['id']]) : tep_get_products_name($pInfo->products_id, $languages[$i]['id'])), 'style="width: 380px"'); ?></td>
	  </tr>
<?php
}
?>

  • 3 weeks later...

Archived

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

×
×
  • Create New...