Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to limit lenght of product name


yaniv14

Recommended Posts

Hi,

 

How can I limit the length of characters that display in product name so it will not be more than one line, for example (product name...) the '...' will show continuance.

It is working like that in product description but not in name.

 

another question, is it possible to show manufacture url link in Product_info table instead of the manufacture info module that show in the left/right column bar?.

 

Thank you.

Link to comment
Share on other sites

Hi

 

1) question:

Something like this:

 

$rest = substr("abcdef", 0, -1);
echo $rest.'...';  // returns "abcde..."

 

2) question - Yes

Link to comment
Share on other sites

Hi,

 

here is a link to explain my issue: http://www.kyboutiqu...&sort=2a&page=2

the top 2 items on the left & center you can see the product name is dropping into 2 lines.

how can i limit it to 1 line so it will show: "

Drop Armhole Graphic Tank..."

i know i need to do something like: substr("avcdef", 0, 25); but in which file and what exactly?

 

thanks

Link to comment
Share on other sites

Go to the page which displays this info and look in the address bar. Find the bit that ends .php, this is the file you need to start with.

 

http://www.theukwaltons.co.uk/product_info.php?cPath=25&products_id=29

 

product.info.php is the file to start with, now you have to find it on your site. As there are literally thousands of ways everyone puts their files up on their server you need to browse around your site and find it.

 

You can use an ftp client such as filezilla or your host's file manager.

 

When you find it download it to your pc and take a copy.

 

Now you can edit it.

 

Search for product.name

 

   if (tep_not_null($product_info['products_model'])) {
  $products_name = $product_info['products_name'] . '<br /><span class="smallText">[' . $product_info['products_model'] . ']</span>';
   } else {
  $products_name = $product_info['products_name'];
   }

 

Now you can amend it to your hearts content.

 

HTH

 

G

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...