Hi,
Thank you all for your attention.
I wrote code to solve my problem.
I edit the backend's view 'order edit_products' for isis temlate.
The line #60:
foreach($this->fields['item'] as $fieldName => $oneExtraField) {
Instead of it I insert:
//almika I begin
echo '<script type="text/javascript">
jQuery(document).ready(function($) {
$(".almika_remove").click(function() {
$("input[name=\'almikacheckbox\']").each(function(i, val) {
if (!val.checked) {
$("."+$(val).attr(\'class\')).remove();
}
$(val).remove();
});
$(".almikalable").remove();
});
});
</script>';
echo '<a href="#" class="almika_remove btn">Delete unchecked</a><br />';
//almika I end
foreach($this->fields['item'] as $fieldName => $oneExtraField) {
//almika II begin
if(!empty($this->orderProduct->$fieldName) && strlen($this->orderProduct->$fieldName)) {
$almikachecked = ' checked="checked"';
}
else {
$almikachecked = '';
}
echo '<input type="checkbox" name="almikacheckbox" class="hikashop_order_product_customfield_'.$fieldName.'"'.$almikachecked.'><label class="almikalable">'.$fieldName.'</label>';
//almika II end
Now I can check custom fields to save to the product. The non empty fields are checked by default.
Then I can delete unchecked fields. To do this it is necessary to click 'Delete unchecked'.
Thus the edited product has only fields that you want to give it.
It works for me.
Best regards