Im very close and almost there.... But i still have an issue....
<?php
function klass24_pt_move_attributes() { ?>
<script type="text/javascript">
$("#plugin-hook").change(function(){
var div1Html = $('#atr-form').html();
// Create div with id set to moved_custom_attributes, inserted after descshow
$("<div></div>").attr('id', 'moved_custom_attributes').insertAfter(".attributes_placement");
// At id moved_custom_attributes append (Acrescentar) the form atr-item
$('#moved_custom_attributes').appendTo( ".attributes_placement" ).html(div1Html);
});
</script>
<?php }
$section = Rewrite::newInstance()->get_section();
if ($section == 'item_add' || $section == 'item_edit') osc_add_hook('footer', 'klass24_pt_move_attributes');
function trigger_plugin_hook() { ?>
<script type="text/javascript">
$("#atr-form").hide();
$("#plugin-hook").change();
</script>
<?php }
osc_add_hook('item_form', 'trigger_plugin_hook', '1');
osc_add_hook('item_edit', 'trigger_plugin_hook', '1');
?>
At the moment the attributes field disapear from the bottom of publish new ad and it's placed on the position i want (Before price)...
Issue1:I cant post the listing, because i select on moved attribute fiield the attribute i want but the line on bottom of function $("#atr-form").hide(); it's just hidden but still there waiting for selection... I try $("#atr-form").remove(); biut seems the data was lost and not available to be displayed i moved field form....
Issue2: After choose a categorie with attributes, the attribute field is dysplayed, but if i change the category for one with no attributes the field attributes still there...
Any ideas???
Best Regards
Nightfly