VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: The Godfather on March 10, 2016, 23:55:50 PM

Title: Virtuemart 3 Crops Customfield Editor Content [Report BUG ]
Post by: The Godfather on March 10, 2016, 23:55:50 PM
Hi

I want to have a long description about my product in custom tab, but it only shows a little of the text and causes to destroy custom tab template in product page.

I tried to solve this problem by Database modification but i couldn't( then i restored it to default ) . please see the example:

http://goo.gl/JaUAHQ

please see custom tab. I wanted to copy all the text of description ( توصیف ) to custom tab, but it only shows some of it ( First, I copied exact html code of product to custom field editor, but when i saved it, editor crops most of codes and didn't close most of tag, so i deleted the unused html code which caused template to be scrambled. ( please see: http://www.awesomescreenshot.com/0e05opsua6 )
if you didn't understand what i'm saying because of my bad English, please do the exact thing that I'm saying:
Please do what i'm saying.

Please copy the entire code of description of a long text ( for example my product page ) ,paste it to the editor of custom tab, Now save it.
Now, Please see this customfield which should show your text. ( for example i've got a tab named Custom tab, and when i copied all exact html codes or even a simple long text, all my customtab template fall apart and template does not show well. ) :
if you do the things that i said, you will see the exact issue that i got. I hope that i could tell you what the real problem is.
I test this problem even on another template and another site but this problem still stays on.

VirtueMart 3.0.12
PHP Built On    Linux
Database Version    5.5.31-log
Database Collation    utf8_general_ci
PHP Version    5.6.19
Web Server    Apache
WebServer to PHP Interface    cgi-fcgi
Joomla! Version    Joomla! 3.4.8 Stable [ Ember ] 24-December-2015 19:30 GMT
Joomla! Platform Version    Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
User Agent    Mozilla/5.0 (Windows NT 6.2; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0

can you please help me?
So Much thanks, in advance.
Title: Re: Virtuemart 3 Crops Customfield Editor Content [Report BUG ]
Post by: Studio 42 on March 11, 2016, 00:14:31 AM
The customfield max char is not so long as the long description. SO if you try to insert a long text this is trimed.
A solution, is to declare 2 time the customfield or more and split the text.
Title: Re: Virtuemart 3 Crops Customfield Editor Content [Report BUG ]
Post by: Milbo on March 11, 2016, 09:44:33 AM
or to use the hidden config for a less performant table layout.
Title: Re: Virtuemart 3 Crops Customfield Editor Content [Report BUG ]
Post by: The Godfather on March 11, 2016, 09:53:03 AM
Isn't there anyway to make it like description tab long?
Even if I purchase extra services ( Developing for 0.5 hour ), is it possible to make it alright ?
Thanks

Quoteor to use the hidden config for a less performant table layout.
How is it possible? thanks
Title: Re: Virtuemart 3 Crops Customfield Editor Content [Report BUG ]
Post by: jenkinhill on March 11, 2016, 10:00:36 AM
Quote
How is it possible? thanks

http://docs.virtuemart.net/manual/general-concepts/206-hidden-configurations.html
Title: Re: Virtuemart 3 Crops Customfield Editor Content [Report BUG ]
Post by: The Godfather on March 11, 2016, 10:52:32 AM
Quotehttp://docs.virtuemart.net/manual/general-concepts/206-hidden-configurations.html
I'm sorry to ask this ( maybe ) simple question, but what should i exactly edit in virtuemart.cfg ?
Title: Re: Virtuemart 3 Crops Customfield Editor Content [Report BUG ]
Post by: Studio 42 on March 11, 2016, 11:18:47 AM
Quote from: Milbo on March 11, 2016, 09:44:33 AM
or to use the hidden config for a less performant table layout.
It's not less performant to use Text vs varchar, only when you do an order by a Text field, It's slow.
See here http://nicj.net/mysql-text-vs-varchar-performance/ and don't check old test from 2006 !
Title: Re: Virtuemart 3 Crops Customfield Editor Content [Report BUG ]
Post by: The Godfather on March 12, 2016, 12:03:54 PM
Please someone help me fix this problem, Even if I need to purchase something like developing support or anything else. Just please someone do it and tell me how much may i pay to get it done.
Thanks.
Title: Re: Virtuemart 3 Crops Customfield Editor Content [Report BUG ]
Post by: Studio 42 on March 12, 2016, 14:16:49 PM
The customfield table is "optimized" for most needs.
In your case, change the varchar customfield_value column to text type in mysql and you can then use longer strings.
Else use my other solution. Add multiple customfields and split your text.
Title: Re: Virtuemart 3 Crops Customfield Editor Content [Report BUG ]
Post by: The Godfather on March 12, 2016, 23:51:13 PM
QuoteIn your case, change the varchar customfield_value column to text type in mysql and you can then use longer strings.
You're the best, man.
So much thanks. I almost was being killed because of heart attack that this problem caused ...

Changing datatype of customfield_value doesn't make any trouble later?
Title: Re: Virtuemart 3 Crops Customfield Editor Content [Report BUG ]
Post by: The Godfather on March 13, 2016, 00:18:43 AM
For anyone who want to do the same i did:
Go to phpmyadmin>sql> enter this:

alter table (Your DB Prefix)_virtuemart_product_customfields
modify column customfield_value text not null;
Title: Re: Virtuemart 3 Crops Customfield Editor Content [Report BUG ]
Post by: Milbo on March 13, 2016, 10:42:32 AM
This will be reset when you do your next update, this is not an update safe solution. You must use the config!
Title: Re: Virtuemart 3 Crops Customfield Editor Content [Report BUG ]
Post by: Studio 42 on March 13, 2016, 13:35:12 PM
The Godfather
the setting is dblayoutstrict.
you need to add in file virtuemart.cfg a line
dblayoutstrict=0
else you loose your changes, next time

Max,
Why you don't use text but var_char, have you do some speed test about  this ?
Title: Re: Virtuemart 3 Crops Customfield Editor Content [Report BUG ]
Post by: Milbo on March 14, 2016, 11:35:27 AM
Patrick, nice post
http://nicj.net/mysql-text-vs-varchar-performance/

So I have to reconsider the use of varchar, seems if there "too many" entries, then system becomes slow.
Title: Re: Virtuemart 3 Crops Customfield Editor Content [Report BUG ]
Post by: Studio 42 on March 14, 2016, 13:33:35 PM
It seems that more the database grow, better is to use text.
The only problem is when you need to use order by.