How do I get rid of the 300 character limit on Short Descriptions?
I set them up the way I want them, and the cart truncates them the way it wants. What makes matters worse is that it seems to vary the amount of text we can enter. One product can have quite a bit of text, yet another will have a shorter overall length and it gets truncated.
I want it out! I feel very strongly that I should be able to set up a product the way I want it setup, and I get really upset when I’m overridden.
Cheers,
Mike
I assume you mean on the products page, the listings?
if so
/skins/skin_name/customer/products_pages/products.tpl
line 34-35
```php
{$product.short_description|truncate:280:"... `$lang.more_link`"}
```
remove the " |truncate:280: "
Nice tip ETI!
How about changing the field lenghts for “product features”? I’ve looked and looked but can not figure out what controls the length of the feature descriptions. Any ideas? Thanks,
j
/skins/skin_name/customer/products_pages/product_features.tpl
Ya, I located that page, but I’m not sure what limits the length of the description. I’ll keep poking around, thanks,
j
You would need to change the field that stores the feature description in the database if you need more space than the current 255 characters. You would need to change the “description” field in the “cscart_product_features_descriptions” table. Currently it is a varchar type set to a maximum length of 255 characters. This also happens to be the largest number of characters you can fit into a varchar field, so you would need to change the field type to a blob type if you need more characters. All of these changes could be easily made with a program like phpmyadmin.
Hi Compernicus,
Yup, I figured that much out on my own too, but when I change the field to text or blob phpmyadmin gives me an error message and chokes. But I only had like 5 min to look into it. I’ll keep poking around and if i figure anything out i’ll post it here. Thanks,
j
I would try “TEXT” column type.
Yup, tried all the options that allow larger fields, the 0-65355 size fields and it won’t take. If you try to change it you get the following error msg:
“Error (1170) BLOB/TEXT column ‘value’ used in key specification without a key length”
j
[quote name=‘ETInteractive’]I assume you mean on the products page, the listings?
if so
/skins/skin_name/customer/products_pages/products.tpl
line 34-35
```php
{$product.short_description|truncate:280:"... href=\"`$index_script`?`$target_name`=products&product_id=`$product.product_id`\">`$lang.more_link`"}
```
remove the " |truncate:280: "[/QUOTE]
There's a little more to it than that. There also some things to take out on the next line as well. The easiest thing to do is to find the two lines above and replace them with the following two lines:
{$product.short_description} href=\"`$index_script`?`$target_name`=products&product_id=`$product.product_id`\">
This takes care of all the stuff that broke from deleting the Truncate section. Oh, and note, I added a } at the end of "short_description".
Works great now. Thank you for getting me pointed in the right direction, and for what I learned from tinkering with the code when the output wasn't quite right.
Hey, I just thought of something. This is my very first code contribution, (anywhere). Maybe someday I'll be able to take the training wheels off. :p
Mike