Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Where do I add size=70 to change input field?


MikeMike

Recommended Posts

I am using long product names and want wider input fields on admin/categories.php.

 

Can I add size=70 somewhere in this code?

I tried adding it in html_output.php but it affect all input fields and I only want to change the 3 product name fields.

 

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

         </tr>

 

Regards

Mike

Link to comment
Share on other sites

The size goes in the 3rd argument of tep_draw_input_field, so it should be like this

<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'] . ']', (($products_name[$languages[$i]['id']], 'size="70"') ? stripslashes($products_name[$languages[$i]['id']]) : tep_get_products_name($pInfo->products_id, $languages[$i]['id']))); ?></td>

         </tr>

In olden times the men were made of iron and the ships were made of wood; now it's the other way around. :wink:

Link to comment
Share on other sites

It looks like I didn't tell quite right about what to do. Try this

<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'] . ']', (($products_name[$languages[$i]['id']]) ? stripslashes($products_name[$languages[$i]['id']]) : tep_get_products_name($pInfo->products_id, $languages[$i]['id']), 'size="70"')); ?></td>

         </tr>

There sure are a lot of parentheses in there. I hope this is right.

 

size does go in the 3rd argument of tep_draw_input_field, the harder question is where is the 3rd argument in all of that code.

In olden times the men were made of iron and the ships were made of wood; now it's the other way around. :wink:

Link to comment
Share on other sites

Now I am getting: Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/virtual/site1/html/adm1/categories.php on line 483 :shock:

 

Any other suggestions?

 

 

Regards

Mike

Link to comment
Share on other sites

OK, one more try. I tested this on my sample store so I think it will be right
<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'] . ']', (($products_name[$languages[$i]['id']]) ? stripslashes($products_name[$languages[$i]['id']]) : tep_get_products_name($pInfo->products_id, $languages[$i]['id'])), 'size="70"'); ?></td>

         </tr>

The only difference is 2 ) before size="70", 1 after instead of 1 before 2 after.

In olden times the men were made of iron and the ships were made of wood; now it's the other way around. :wink:

Link to comment
Share on other sites

Great! I knew there had to be a limit to how many times I could get the parentheses wrong. :)

In olden times the men were made of iron and the ships were made of wood; now it's the other way around. :wink:

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...