Hi, Nicolas, it is not that I don't trust my people, I just don't want to give them that kind of temptation as well for me to have a reason to doubt them if things don't tally. In any case, thank you for considering the option in a future release.
Furthermore, I would like to share with the community a workaround that I did. It is a small script added to the bottom of the view Order->Show of your backend template. It just monitors the status, and removes all buttons on the following statuses of shipped, refunded, cancelled. It does not affect nor interfere with any of the core functions of Hikashop.
Here is the code, I just added it to the bottom of the view file Order->Show.
<script>
// Disable buttons on shipped, cancelled, refunded
function f_checkAdminEdit (){
var l_adminEdit = document.querySelector ("#hikashop_order_field_general .hika_edit");
l_adminEdit.onmousedown = function (e){
var l_getSave;
function getSaveButton (){
var l_adminSave = document.querySelector ("#hikashop_order_field_general .hika_edit .btn-success");
if (l_adminSave) {
clearInterval(l_getSave);
l_adminSave.onmousedown = function (e){
setTimeout (f_checkStatus, 2000);
}
}
}
l_getSave = setInterval (getSaveButton, 1000);
}
}
function f_disableButtons(){
var l_hikaEdit = document.querySelectorAll(".hika_edit");
var l_hikashop_order_item_edit_value = document.querySelector(".hikashop_order_item_edit_value a");
var l_hikashop_order_item_remove_value = document.querySelector(".hikashop_order_item_remove_value a");
l_hikaEdit.forEach(function (item, index) {
item.style.display = "none";
});
l_hikashop_order_item_edit_value.style.display = "none";
l_hikashop_order_item_remove_value.style.display = "none";
}
function f_checkStatus (){
var l_orderStatus = document.querySelector(".admintable .hikashop_order_status .hikashop_order_status").innerText;
switch (l_orderStatus) {
case 'shipped':
case 'cancelled':
case 'refunded':
f_disableButtons();
break;
default:
setTimeout (f_checkAdminEdit, 2000);
}
}
f_checkStatus ();
</script>