Author Topic: Optional editor for short description  (Read 385 times)

sandomatyas

  • Jr. Member
  • **
  • Posts: 261
Optional editor for short description
« on: February 05, 2019, 16:27:48 pm »
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

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10319
  • VirtueMart Version: 3+
Re: Optional editor for short description
« Reply #1 on: February 05, 2019, 19:16:12 pm »
there is also the customfield "editor"
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3725
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Optional editor for short description
« Reply #2 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.

sandomatyas

  • Jr. Member
  • **
  • Posts: 261
Re: Optional editor for short description
« Reply #3 on: February 06, 2019, 09:14:26 am »
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

  • Jr. Member
  • **
  • Posts: 261
Re: Optional editor for short description
« Reply #4 on: February 06, 2019, 09:26:07 am »
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

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3725
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Optional editor for short description
« Reply #5 on: February 06, 2019, 15:29:38 pm »
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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9805
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/