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

[BUG] 2.0.24 Custom fields (radio, other) id's

Started by d0ublezer0, October 26, 2013, 15:54:20 PM

Previous topic - Next topic

d0ublezer0

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

Milbo

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. '" '
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

d0ublezer0

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.

Milbo

Next update I want to use Elements and make them overridable. So everyone can decide himself.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

d0ublezer0

What is "Elements" in your current implementation? I'm not sure I understand you correctly.