Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Admin Display Field Length


pingpongrob

Recommended Posts

Posted

Hello All, can anybody please help me modify the Display field length in the Admin Module.

 

For example when you edit a product description, only the first 21 characters are displayed, how do I change this to let say 35 characters.

 

Thanks in advance.

Posted

I do not really know what you are referring to by product description, which has virtually NO limit as to how much text you'd like to enter into. Some sites have pages of text and even include images in it using a html add-on without problem. THere's limit to the product NAME field though.

 

Ken

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Posted
I do not really know what you are referring to by product description, which has virtually NO limit as to how much text you'd like to enter into. Some sites have pages of text and even include images in it using a html add-on without problem. THere's limit to the product NAME field though.

 

Ken

 

Hello Ken, Its the actual box length as in the pic I have attached

product%20length.jpg

 

Hope this makes it a little clearer.

 

Regards

Rob

Posted

Hello Bill, Thanks for the reply,

 

I think that everyone is not understanding what I mean, I'm probably not explaining very well.

 

I can type as much as I need its not a problem, its just that the box that displays the information, only display 20 charachters, before it scrolls across

 

I have attached a picture with the meaning.

product%20length.jpg

 

Thanks in advance

Posted

Hello Bill, Thanks for the reply,

 

I think that everyone is not understanding what I mean, I'm probably not explaining very well.

 

I can type as much as I need its not a problem, its just that the box that displays the information, only display 20 charachters, before it scrolls across

 

I have attached a picture with the meaning.

product%20length.jpg

 

Thanks in advance

Posted
Does anybody understand what I mean

Yes...this can be done on the admin side. Take a look at the HTML form output in admin/categories.php

 

I believe the line you are looking for is around line 555:

 

<td class="main"><?php echo tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '70', '

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Posted

Thanks for your help Bill,

that would change the product description box, not the products name box.

 

I believe the code that I have to change is around line 567 of the same file, but I not sure what part to change.

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

Posted

with phpmyadmin goto: products goto: products_model:

change varchar(12) in varchar(36)

"If you're working on something new, then you are necessarily an amateur."

Posted

Thanks Berkedam, for your help.

 

I have tried doing as you said, Changing the products model, from Varchar 12 to Varchar 36.

 

But nothing changes in the admin side.

 

Anymore idea's please

Posted
Thanks Berkedam, for your help.

 

I have tried doing as you said, Changing the products model, from Varchar 12 to Varchar 36.

 

But nothing changes in the admin side.

 

Anymore idea's please

 

Robert,

 

I understand what you want changed, but I am not sure if I know the answer. Based upon what Berkedam said, you should go to php myadmin, but the table you want is 'products_description' and there you will find the products_name field. Mine is set to varchar64. Changing this will allow a longer name for your product, but I don't think it will change the size of the box as my names extend beyond the length of the box already.

 

Tim

Posted

Thanks Tim, you would think that a program that is so customusable, would be able to change such a simple thing.

I'm sure it can be done.

Posted
Is this such a hard problem to fix.
Robert, the database changes are not going to change the actual visual input field length.

Find this code in includes/functions/html_output.php:

// Output a form input field
 function tep_draw_input_field($name, $value = '', $parameters = '', $required = false, $type = 'text', $reinsert_value = true) {
$field = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"';

Change it to

// Output a form input field
 function tep_draw_input_field($name, $value = '', $parameters = '', $required = false, $type = 'text', $reinsert_value = true) {
$field = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '" size="60"';

Change the value "60" to whatever value you need.

 

Hope this is what you were looking for,

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Posted

Also:

 

If you just want the product name field instead of a "global" increase (shown above), then you would want the following:

 

Find the following in your admin/categories.php file:

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

Make the following changes:

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

I have 60 above but you will need to change that to whatever works for you.

 

Keep in mind that though, if your database is set for a lower character than the one you specify, then it won't work.

The modifications above will make the input form wider, but the database will only store the number of characters that is set for that field. Just increase the VarChar(xx) to (XX) to meet your needs.

 

Well, that should get the results you were looking for anyway.

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Posted

Thanks Bill, it did the trick in the Catogories/Products section in Admin, and I thought that changing it would change the length everywhere for the product name, but this is not the case.

 

product%20length2.gif

 

Its the Quick update for SPPC. and as you can see from the picture, the text box is to small.

 

Your help in locating the source code would be very Appreciated.

 

Thanks in Advance. :blink:

Posted

I believe the answer to this question is found somewhere in the Code Below. Can anyone with some PHP programing knowledge Help. :huh:

Posted

I know what you mean. You want the box bigger so you can see what is written inside it rather than seeing 3 words, you can see say 6 words. I had this problem with the Products Description box. You can make it larger. I did mine ages ago. Thing is, I cant remember how to do it but the fix is here in the forum. I know, because thats where I found it. I will look around for it. If I find it, I will post it. It can be done. There is hope :)

  • 2 months later...
Posted

Surely someone else must need this problem fixed, Its such a great contribution. Just needs a little touch to make it user friendly.

  • 2 weeks later...

Archived

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

×
×
  • Create New...