News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Problem with saving Shopper Field (default always ends op to be 0)

Started by beuzer, December 29, 2012, 23:45:37 PM

Previous topic - Next topic

beuzer

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]

Milbo

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`

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

dorex

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

PHP 5.2.17 - Joomla 2.5.8 - Virtuemart 2.0.16

dorex

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.
PHP 5.2.17 - Joomla 2.5.8 - Virtuemart 2.0.16

ronjb

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

Flasher

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!