Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to fix column width when product name too long


amark

Recommended Posts

Posted

Hello

 

Setting of right column width is describe in the manual and It works until the product name is single word of i.e. 30 characters.

Then the apllication cant divide the word and column right is too wide.

For example long name of notebooks with the configuration.

NB Sony Vaio BX297XP PM760/17''/1GB/2x100/DVD±RW/BT

NB Sony Vaio BX297XP is in the first line and the rest is in the second, but it is too long

The link is:

http://www.amark.sk/product_info.php?cPath...101000297980005

How can I force osCommerce to divide such long word or really fix the column width?

Thank You for advice

Frank

Hello World!

Posted
Hello

 

Setting of right column width is describe in the manual and It works until the product name is single word of i.e. 30 characters.

Then the apllication cant divide the word and column right is too wide.

For example long name of notebooks with the configuration.

NB Sony Vaio BX297XP PM760/17''/1GB/2x100/DVD±RW/BT

NB Sony Vaio BX297XP is in the first line and the rest is in the second, but it is too long

The link is:

http://www.amark.sk/product_info.php?cPath...101000297980005

How can I force osCommerce to divide such long word or really fix the column width?

Thank You for advice

Frank

PHP's chunk_split function

 

Richard.

Richard Lindsey

  • 5 months later...
Posted

I have the same problem, and I'm wondering how you do this in your files. I'm not a big php expert.

 

Also I found this solution but I don't know its save (and its a hassle) add ​ ; (without the space between the ;) on the place you want the word to break. Is it save?

Posted

Oke after some pm's with Velveeta, we came to this solution. If you want to use the chunk_split method in your product notifications box, do the following:

 

find this part:

sprintf(BOX_NOTIFICATIONS_NOTIFY, tep_get_products_name($HTTP_GET_VARS['products_id'])) .'</a></td>

 

and replace it with

sprintf(BOX_NOTIFICATIONS_NOTIFY, chunk_split(tep_get_products_name($HTTP_GET_VARS['products_id']), 15, '-<br>')) .'</a></td>

 

This makes it work. In other situation you might need to make use of the echo command, but not now because it's statement that's already outputting stuff.

 

All credit goes to: Velveeta!

  • 6 months later...
Posted

Hi,

 

I have some long categories names and the when I use the advance search the category drop down line is so big that it makes my page look bad..

 

Could I use that function to correct it even that in the database the category length was define to 400 chars (if I remember good)

 

I hope that you understand my explanation..

 

Thank alot for any help from you :rolleyes:

 

Nathali

Best Regards,

Nathali

Archived

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

×
×
  • Create New...