Hey, hey,
Custom field type E is not displayed correctly in the cart.
From what I can see is that the second custom field type E is nested inside the first, and the third inside the second...
It worked fine in VM 3.0.6, it happened after the upgrade to 3.0.8.
See attachment.
I colored it for clearance.
In the attachment you also see a type-S, that one is displayed correctly.
But when placed at the end it is also nested inside product field type E.
J! 3.4.1
VM 3.0.8
Thank you.
Wim
isn't it a problem with 'custom fields for all' missing a closing span?
Yeah... but VM updated and Custom Fields for All did not.
As I said in VM 3.0.6 it was displayed correctly, in VM 3.0.8 it's not.
Just in case I also informed the CF4A devs.
I tested it with other plug-ins including the text input.
It happened with all of them.
<span class="product-field-type-E">
<span>
Input 1
</span>
<span class="product-field-type-E">
<span>
Input 2
</span>
</span>
</span>
Seems like the <span class="product-field-type-E"> is not closing after a custom field display
file: administrator/components/com_virtuemart/models/customfields.php
lines 1236-1248
code:
$otag = ' <span class="product-field-type-' . $productCustom->field_type . '">';
if ($productCustom->field_type == "E") {
$tmp = '';
if (!class_exists ('vmCustomPlugin'))
require(VMPATH_PLUGINLIBS . DS . 'vmcustomplugin.php');
JPluginHelper::importPlugin ('vmcustom');
$dispatcher = JDispatcher::getInstance ();
$dispatcher->trigger ($trigger.'VM3', array(&$product, &$productCustom, &$tmp));
if(!empty($tmp)){
$html .= $otag.$tmp;
}
}
should be:
$otag = ' <span class="product-field-type-' . $productCustom->field_type . '">';
$closing_tag='</span>';
if ($productCustom->field_type == "E") {
$tmp = '';
if (!class_exists ('vmCustomPlugin'))
require(VMPATH_PLUGINLIBS . DS . 'vmcustomplugin.php');
JPluginHelper::importPlugin ('vmcustom');
$dispatcher = JDispatcher::getInstance ();
$dispatcher->trigger ($trigger.'VM3', array(&$product, &$productCustom, &$tmp));
if(!empty($tmp)){
$html .= $otag.$tmp.$closing_tag;
}
}
I suggest using the $closing_tag for the rest of the code instead of repeating the '</span>' closure
Since you use a variable for opening tag, better have a variable also for the closing to avoid such errors
I suggest to use the latest version, called vm3.0.9 and to be delighted by the fix given by Kainhofer around 3 weeks ago.
Thank you. That fixed it.
Wim