Problem with size of Custom Field Type, Cart Variant, default input

Started by angusmcr, August 02, 2013, 13:01:13 PM

Previous topic - Next topic

angusmcr

I have a number of long names for the cart default variants so i need to increase the number of characters i can use in the default input

I have searched the forms and found how to change the field from textinput to text area  found a way to change the input type from
administrator\components\com_virtuemart\models\customfields.php
from-
$html .= VmHTML::row ('input', 'COM_VIRTUEMART_DEFAULT', 'custom_value', $datas->custom_value);
to
$html .= VmHTML::row ('textarea', 'COM_VIRTUEMART_DEFAULT', 'custom_value', $datas->custom_value);

How ever i can not input any more data than before any one know where increase the characters that will save?


I also was able to remove the no price change shortening the displayed box length by
located in ROOT/language/en-GB/en-GB.com_virtuemart.ini simply open this file in something like your text editor find the line that reads COM_VIRTUEMART_CART_PRICE_FREE="No additional charge" and replace it with COM_VIRTUEMART_CART_PRICE_FREE="" save and upload
but this does not affect the amount of data i can input in the defaul values.

how can i increase the character limit for this default field or is the another way to list more Cart Variants


I think this post describes the solution in vm 1 http://forum.virtuemart.net/archive/index.php?topic=15710.0;wap2 but i can find A vm2 solution to this



CreativeDesigns

Did you ever get a response to this question?
I have the same problem, but cant find a solution :(

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/


LePetitJardin

Quote from: angusmcr on August 02, 2013, 13:01:13 PM
I have a number of long names for the cart default variants so i need to increase the number of characters i can use in the default input

I have searched the forms and found how to change the field from textinput to text area  found a way to change the input type from
administrator\components\com_virtuemart\models\customfields.php
from-
$html .= VmHTML::row ('input', 'COM_VIRTUEMART_DEFAULT', 'custom_value', $datas->custom_value);
to
$html .= VmHTML::row ('textarea', 'COM_VIRTUEMART_DEFAULT', 'custom_value', $datas->custom_value);

How ever i can not input any more data than before any one know where increase the characters that will save?

You also need to modify the database as the default input is stored in a CHAR structure with a maximum size of 255 characters.

To do this, use something like phpMyAdmin to find  the table xxxx_virtuemart_customs and change the custom_value field from char to text (you don't need to give it a size). This will now allow you to use up to 65536 characters in the default input.

I'm sure someone smarter than me can come up with some SQL to do this.