.....foreach($enable_attached_products_array as $blabla) { $html2 = '<tr class="cp-hide"><td class="key">'. JText::_('CATPRODUCT_SHOW_QTY_ATTACHED') .'</td><td>' .JHTML::_ ('select.genericlist', $handle_quantity, $paramName.'['.$row.'][attached_products_show_qty_array]['.$i.']', 'aaa', 'value', 'text', current($attached_products_show_qty_array)).'</td></tr>'; $html .='<fieldset id="catproduct_attach_fieldset'.$i.'"> <legend>'. JText::_('CATPRODUCT_FIELDSET5_TITLE') .'</legend> <table class="admintable"> '.VmHTML::row('checkbox',JText::_('CATPRODUCT_ENABLE_ATTACHED_PRODUCTS'), $paramName.'['.$row.'][enable_attached_products_array]['.$i.']',$blabla).' '.VmHTML::row('checkbox',JText::_('CATPRODUCT_ENABLE_ATTACHED_TITLE'), $paramName.'['.$row.'][enable_title_for_attached_array]['.$i.']',current($enable_title_for_attached_array)).' '.VmHTML::row('input',JText::_('CATPRODUCT_TITLE_ATTACHED_PRODUCTS'), $paramName.'['.$row.'][title_for_attached_products_array]['.$i.']',current($title_for_attached_products_array)).' <tr><td class="key">'. JText::_('CATPRODUCT_CHOOSE_LAYOUT_ATTACHED') .'</td><td>' .JHTML::_ ('select.genericlist', $layout_g, $paramName.'['.$row.'][attached_products_layout_array]['.$i.']', 'aaa', 'value', 'text', current($attached_products_layout_array)).'</td></tr> '.VmHTML::row('input',JText::_('CATPRODUCT_DEF_QTY_ATTACHED'), $paramName.'['.$row.'][attached_products_def_qty_array]['.$i.']',current($attached_products_def_qty_array)).' '.$html2.' <tr><td class="key">'.JText::_('CATPRODUCT_ATTACHED_SEARCH').'</td><td>['.$i.'] '.JHTML::_ ('select.genericlist', $field_attached, $paramName.'['.$row.'][id_sku_for_attached_products_array]['.$i.']', '', 'value', 'text', current($id_sku_for_attached_products_array)).' </td></tr> '.VmHTML::row('input',JText::_('CATPRODUCT_ATTACHED_PRODUCTS'), $paramName.'['.$row.'][attached_products_array]['.$i.']',current($attached_products_array)).' </table> <div style="float:right;" class="catproduct-button" onclick="catproduct_remove_attached(\''.$i.'\')" >'.JText::_('CATPRODUCT_ATTACHED_ARRAY_REMOVE').'</div> </fieldset>';....
Who‘s behind this
after many attempts, I think the strange code is caused by attached products in catproduct.php files in the following code.
If I remove ['.$i.'] works but only if you do not add more attached products.
You think there could be a solution? (Thanks to you, I resolved with improved CSV end replacement rule).
Best Regards
Bruno