Guest Posted October 19, 2005 Share Posted October 19, 2005 Is there a way to limit the text on latest products. I added a new product and it doens't stay in line with the other products. Quote Link to comment Share on other sites More sharing options...
Guest vrakas Posted October 19, 2005 Share Posted October 19, 2005 I have found that when you seperate the words with a space it helps a lot. ex. dvdworld/dvdworld and dvdworld / dvdworld There was a post about this a while ago, try the search and change the date to over 60 days. I will also try and find it for you. ;) Quote Link to comment Share on other sites More sharing options...
Guest Posted October 19, 2005 Share Posted October 19, 2005 I used a display limit on the text on latest products on cubecart 2. It was something like show 15-20 characters. Edit Here is the old code CODE // start loop of results while($row = mysql_fetch_array($new_prod_result)){ $title=$row["title"]; $product=$row["product"]; $description= $row["description"]; After, Add CODE $description=stripslashes($description); $description=substr($description,0,75); Can i do this on V3? Quote Link to comment Share on other sites More sharing options...
Guest estelle Posted October 20, 2005 Share Posted October 20, 2005 Or you can just set the height so it is large enough for all images and all titles to fit. E.g. in skins/Killer/styleTemplates/content/index.tpl: <!-- BEGIN: repeat_prods --> <div style="float: left; text-align: center; width: {VAL_WIDTH}px; height: 150px;"> The actual value for the height will depend on your site. Just try different values until you find what works. Quote Link to comment Share on other sites More sharing options...
markscarts Posted October 20, 2005 Share Posted October 20, 2005 Estelle is right - and the same goes for subcategories, as you may learn when setting up the store. For more information on fixing these issues, see the tutorial in the Downloads section. Quote Link to comment Share on other sites More sharing options...
Guest estelle Posted October 20, 2005 Share Posted October 20, 2005 Sorry that i didn't really answer your question the first time round. That code will not work in v3, but here's the change to make. Edit includes/content/index.tpl. Find this line: $index->assign("VAL_PRODUCT_NAME",$latestProducts[$i]['name']); *Replace* it with these lines (change the 75 to however many characters you want): $name = substr($latestProducts[$i]['name'],0,75); $index->assign("VAL_PRODUCT_NAME",$name); Done! :sourcerer: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.