VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: thelordofweb on May 29, 2016, 15:14:40 PM

Title: [BUG][Custom Fields] Cannot edit the price of custom field type
Post by: thelordofweb on May 29, 2016, 15:14:40 PM
Summary
It is not possible to edit the price of a custom field when it already has a value higher than zero.

Testing Instructions
VirtueMart and Joomla! versions
I use VirtueMart 3.0.16 and Joomla! 3.5.1
Title: Re: [BUG][Custom Fields] Cannot edit the price of custom field type
Post by: Milbo on May 30, 2016, 10:55:52 AM
Use "0.0", this counts for all prices
Title: Re: [BUG][Custom Fields] Cannot edit the price of custom field type
Post by: thelordofweb on May 30, 2016, 11:46:13 AM
The value 0.0 works. Thank you!
I did a patch. I am attaching it as an archive with two files.
This patch makes it to be possible to edit the Price to 0 leaving the field blank or entering 0.

administrator/components/com_virtuemart/tables/product_customfields.php

patch_fix_customfields_price.diff

The second one is a file generated by Git. If you would like, you can use it to patch the file in your SVN (http://stackoverflow.com/questions/708202/git-format-patch-to-be-svn-compatible).
I have never tried to patch SVN files with Git diff. However, if it works, people that use Git will be able to send you patches in this way.

Title: Re: [BUG][Custom Fields] Cannot edit the price of custom field type
Post by: Milbo on May 31, 2016, 19:23:42 PM
I tell all the time, when people come up with the svn git stuff, that GIT patches WORK on SVN !

I take your patch, slightly changed.
Title: Re: [BUG][Custom Fields] Cannot edit the price of custom field type
Post by: thelordofweb on May 31, 2016, 19:44:02 PM
I see. :)
Thank you!