Author Topic: Suggestion for db fields length/type  (Read 267 times)

arcturus

  • Jr. Member
  • **
  • Posts: 91
  • VirtueMart Version: 3.6.6 10191
Suggestion for db fields length/type
« on: October 05, 2019, 14:09:30 pm »
Hello,

I'd suggest that the product short description to be increased from 2000 characters (maybe text type). I have several products that exceed this 2000 characters limit (mostly because of microdata in short description), so I have to modify varchar(2000) to text each time there is a VM update.
Also, I have few products which's titles exceed 126 characters, so maybe this limit could be increased too.
Thank you.
Cheers,
George
https://www.proxima-mundi.ro

Now I'm using Joomla! 3.9.13 and VM 3.6.6 10191 on PHP 7.3.9

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3016
  • VirtueMart Version: 3.6.3
Re: Suggestion for db fields length/type
« Reply #1 on: October 05, 2019, 14:52:52 pm »
Quote
(mostly because of microdata in short description)

Short description - 200o characters is enough - you are clearly using this for another purpose for which it is not intended

Microdata is served using snippet sublayout
regards
A

Joomla 3.9.12
php 7.2

arcturus

  • Jr. Member
  • **
  • Posts: 91
  • VirtueMart Version: 3.6.6 10191
Re: Suggestion for db fields length/type
« Reply #2 on: October 05, 2019, 22:16:45 pm »
Some of them have 700-800 characters, but I use Book type microdata, and thus they get over 2000. I made the short_desc DB field text instead of varchar(2000), and I update it every time I update VM.
Cheers,
George
https://www.proxima-mundi.ro

Now I'm using Joomla! 3.9.13 and VM 3.6.6 10191 on PHP 7.3.9

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4046
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Suggestion for db fields length/type
« Reply #3 on: October 06, 2019, 02:30:08 am »
@arcturus
Add a customfield type > editor to add your microdata for eg. and modify the render so no label and other HTML is added is the right way to do it.
If it not work because text field length, you can make a plugin and use parameters and you can do your own form to easy insert your microdatas.
Parameters can use 65500 chars.

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3016
  • VirtueMart Version: 3.6.3
Re: Suggestion for db fields length/type
« Reply #4 on: October 06, 2019, 11:40:13 am »
Quote
I'd suggest that the product short description to be increased from 2000 characters (maybe text type). I have several products that exceed this 2000 characters limit (mostly because of microdata in short description), so I have to modify varchar(2000) to text each time there is a VM update.
Also, I have few products which's titles exceed 126 characters, so maybe this limit could be increased too.

Just requesting a change in length of a core field(s) told the forum nothing of use.

With a better understanding of your business requirement - it is easier to see what you are trying to achieve and that you are (as noted) using the short description to meet your own needs when another base piece of functionality is already provided to support unique/specific business requirements.

See the good solution response from Studio42

Neither of your requests should make any core release
regards
A

Joomla 3.9.12
php 7.2

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4046
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Suggestion for db fields length/type
« Reply #5 on: October 06, 2019, 18:08:03 pm »
H1 should not exced 80 chars.
More then 120 chars can be simply bad for SEO, a user never search for a so long sentence and you dilute the power of the H1.