Author Topic: Problem with size of Custom Field Type, Cart Variant, default input  (Read 4564 times)

angusmcr

  • Beginner
  • *
  • Posts: 12
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

  • Jr. Member
  • **
  • Posts: 219
    • Creative Designs Studio
  • Skype Name: creative.designs.za
Re: Problem with size of Custom Field Type, Cart Variant, default input
« Reply #1 on: December 03, 2013, 19:15:22 pm »
Did you ever get a response to this question?
I have the same problem, but cant find a solution :(

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10040
  • 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/

CreativeDesigns

  • Jr. Member
  • **
  • Posts: 219
    • Creative Designs Studio
  • Skype Name: creative.designs.za
Re: Problem with size of Custom Field Type, Cart Variant, default input
« Reply #3 on: December 04, 2013, 07:19:43 am »
Thanks so much!

LePetitJardin

  • Beginner
  • *
  • Posts: 4
Re: Problem with size of Custom Field Type, Cart Variant, default input
« Reply #4 on: December 15, 2013, 13:30:19 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.