MikeMike Posted June 16, 2003 Posted June 16, 2003 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
Guest Posted June 16, 2003 Posted June 16, 2003 Hi, You need to add that to the category table in phpmyadmin.
orchard Posted June 16, 2003 Posted June 16, 2003 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:
MikeMike Posted June 16, 2003 Author Posted June 16, 2003 Hi there. I added the code and now I am getting: Parse error: parse error, unexpected ',' in /home/virtual/site1/html/admin/categories.php on line 467 any ideas? Regards Michael
orchard Posted June 16, 2003 Posted June 16, 2003 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:
MikeMike Posted June 16, 2003 Author Posted June 16, 2003 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
orchard Posted June 16, 2003 Posted June 16, 2003 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:
MikeMike Posted June 17, 2003 Author Posted June 17, 2003 Paul..... you are the man of the day!! It worked perfectly. Thanks so much for the help. Regards Mike
orchard Posted June 17, 2003 Posted June 17, 2003 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:
Recommended Posts
Archived
This topic is now archived and is closed to further replies.