VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Development & Testing => Topic started by: d0ublezer0 on October 26, 2013, 15:54:20 PM

Title: [BUG] 2.0.24 Custom fields (radio, other) id's
Post by: d0ublezer0 on October 26, 2013, 15:54:20 PM
administrator\components\com_virtuemart\models\customfields.php
line 961

$group->display .= '<input id="' . $productCustom->virtuemart_custom_id .$row. '" ' . $checked . ' type="radio" value="' .
$productCustom->virtuemart_customfield_id . '" name="customPrice[' . $row . '][' . $productCustom->virtuemart_custom_id . ']" /><label
for="' . $productCustom->virtuemart_custom_id .$row. '" class="other-customfield">' . $this->displayProductCustomfieldFE ($product, $productCustom, $row) . ' ' . $price . '</label>';

in this foreach cycle $row will be the same in every iteration.
as a result, al labels on product details page is for first input id
Title: Re: [BUG] 2.0.24 Custom fields (radio, other) id's
Post by: Milbo on October 28, 2013, 10:06:24 AM
Please try

$group->display .= '<input id="' . $productCustom->virtuemart_customfield_id .$row. '" ' . $checked . ' type="radio" value="' .
$productCustom->virtuemart_customfield_id . '" name="customPrice[' . $row . '][' . $productCustom->virtuemart_custom_id . ']" />;


id="' . $productCustom->virtuemart_customfield_id .$row. '" '
Title: Re: [BUG] 2.0.24 Custom fields (radio, other) id's
Post by: d0ublezer0 on October 28, 2013, 10:35:09 AM
For myself, I have decided the issue, adding another variable in the foreach loop. Since this problem does not bother me (at least until the next update).
However, it would be worth it to fix in a future release.
Thank you.
Title: Re: [BUG] 2.0.24 Custom fields (radio, other) id's
Post by: Milbo on October 28, 2013, 12:02:04 PM
Next update I want to use Elements and make them overridable. So everyone can decide himself.
Title: Re: [BUG] 2.0.24 Custom fields (radio, other) id's
Post by: d0ublezer0 on October 29, 2013, 16:47:23 PM
What is "Elements" in your current implementation? I'm not sure I understand you correctly.