News:

Looking for documentation? Take a look on our wiki

Main Menu

Optional editor for short description

Started by sandomatyas, February 05, 2019, 16:27:48 PM

Previous topic - Next topic

sandomatyas

There is a site of my customer which uses some basic html tags in the sort description: <b>, <i>, etc
The managers have some html knowledge but sometimes they make a mistake, like forget the closing tag, etc which can break the whole layout for the specific productdetails page.
I changed product_edit_description.php and switched the textarea to editor and it works well.
Could you please consider adding an option (or even a hidden config) which tells if VM uses basic texteara or editor for the short description?

PRO


Studio 42

Short desc was not mean to add HTML, but support it.
You can add a little script to add a light editor, it's not right to add plenty of code in the short desc, so you should restrict it.

sandomatyas

Quote from: PRO on February 05, 2019, 19:16:12 PM
there is also the customfield "editor"

I know but after working some sites I figured out that
1. working with custom fields is difficult and can have some problems. Like you add this description on the "custom fields" tab, not the "description" tab where the admins should search for it, you are able to add multiple instances of the field, according to the managers it's more difficult to work with customfields, you need to change the layouts etc
2. having multiple customfields can slow down VirtueMart dramatically. I managed a site with ~10.000 products and moved parameters from the static description to customfields (3-8 custom fields per product) and the page loading time increased by 3-4 times. I had to move some non-searchable params to a separated table and managed to fetch the data from there to display. It reduced the numer of custom fields and also the page loading time

sandomatyas

Quote from: Studio 42 on February 05, 2019, 22:37:58 PM
Short desc was not mean to add HTML, but support it.
You can add a little script to add a light editor, it's not right to add plenty of code in the short desc, so you should restrict it.

Yes I could, but you know that the customer's will is the first, so if they want to use HTML I have to provide some solution.
"Short desc was not mean to add HTML, but support it." so if it's support it why is it is a problem if they want to use an editor for that? I know the field is varchar(2000), but it's also insteresting, why not varchar(1000) or varchar(2500)? Or text? Of course there are performance reasons but in this case they don't care the performance (~20 products) but need html tags. It's about flexibility for me.
I can solve it, there's no technical problem for me, it's only about the structure, flexibility and the possibility to create a proper setup for the customer's needs without hacks and custom fields and third party extensions. :)
Without doubt I like VirtueMart and this is why I try to help with providing the issues which I receive from the customers.

Studio 42

About customfield editor. I use own plugin and text is saved as param, so the size is limited to 65000 characters.
But why is your site so long when using customfields ?
I have some customer using 20 fields or more for filtering and have not this problem.
Check for eg. http://pro.st42.fr/en/android/acer-liquid-z6-plus.html have many customfields
This demo have 3481 products and 111276 customfields and 5458 categories(most categories are empty and only here to do my tests)

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/