VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: beuzer on December 29, 2012, 23:45:37 PM

Title: Problem with saving Shopper Field (default always ends op to be 0)
Post by: beuzer on December 29, 2012, 23:45:37 PM
Hi all,

I have a very frustrating problem with the shopper fields in VM2.
When I save a shopper field the value of "Default" always ends up to be 0.
So when a customer goes to the check out page and want to enter his name there
is already a 0 in that field.

I'm using VM 2.0.16 and Joomla 2.5.8

[attachment cleanup by admin]
Title: Re: Problem with saving Shopper Field (default always ends op to be 0)
Post by: Milbo on January 01, 2013, 22:01:11 PM
Thank you, my fault.

This line is used for example to set a default country (you must enter the id). But I used integer in the db for it. Just adjust this sql (the table prefix) and execute it

ALTER TABLE `#_virtuemart_userfields`
CHANGE COLUMN `default` `default` VARCHAR(255) NULL DEFAULT NULL AFTER `value`

Title: Re: Problem with saving Shopper Field (default always ends op to be 0)
Post by: dorex on July 15, 2013, 19:23:19 PM
Quote from: Milbo on January 01, 2013, 22:01:11 PM
Thank you, my fault.

This line is used for example to set a default country (you must enter the id). But I used integer in the db for it. Just adjust this sql (the table prefix) and execute it

ALTER TABLE `#_virtuemart_userfields`
CHANGE COLUMN `default` `default` VARCHAR(255) NULL DEFAULT NULL AFTER `value`


Hi! I'm having the same problem, but I'm not an advanced user ... would you please explain with more details where should I go and how to "adjust this sql (the table prefix) and execute it"? Thank you in advance.

PS: I found the same problem, but without answer, here:
         https://forum.virtuemart.net/index.php?topic=108544.0
and here:
         https://forum.virtuemart.net/index.php?topic=108041.msg361455#msg361455
and here:
         http://forum.virtuemart.net/index.php?topic=117193.0

Title: Re: Problem with saving Shopper Field (default always ends op to be 0)
Post by: dorex on July 15, 2013, 20:08:25 PM
Ok, I found a solution for less experienced users like myself. Here it is:

Go to phpMyAdmin and login.
In the left side panel select your database. Now it will display all your tables. Search in the list for something like "xyz_virtuemart_userfields" and click on it (by the way, the "xyz"is the prefix of the tables in your database). Now in the main area you will see all the fields containing users information. Look for the column called "Default", go down on it, and where it is a 0 (zero) instead of a "NULL" just click on the zero and check the "Null checkbox"in the pop-up. Repeat that for every zero in the Default column and that's it. You will not have any zeros pre-filled in the user fields.
Title: Re: Problem with saving Shopper Field (default always ends op to be 0)
Post by: ronjb on July 19, 2013, 21:42:33 PM
Is there a way to change the value as a placeholder or add a placeholder and leave the value empty? so on the front-end you will see a sample content on the input textbox but when you click it the content disappears and you can type in your details without have to delete anything..

here's what i wanna have http://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_input_placeholder,

any ideas how to get that?

Thanks
Title: Re: Problem with saving Shopper Field (default always ends op to be 0)
Post by: Flasher on November 27, 2013, 03:23:01 AM
Quote from: Milbo on January 01, 2013, 22:01:11 PM
Thank you, my fault.

This line is used for example to set a default country (you must enter the id). But I used integer in the db for it. Just adjust this sql (the table prefix) and execute it

ALTER TABLE `#_virtuemart_userfields`
CHANGE COLUMN `default` `default` VARCHAR(255) NULL DEFAULT NULL AFTER `value`



Great Fix! Tyvm!