Possible to lock order after shipped

  • Posts: 24
  • Thank you received: 0
4 years 4 months ago #321581

-- HikaShop version -- : 4.3.0
-- Joomla version -- : 3.9.19
-- PHP version -- : 7.3

I have different operators handling the orders. I have ACL already activated on them not being able to delete an order.

My question is, after the status has been changed to shipped/cancelled/refunded, is there a way to finally close the transaction so that it can't be deleted or edited.

As of now, after changing the status to shipped, I can revert it back to created and/or any other status. I can delete/edit items even after the shipped status has been issued.

This might be prone to fraud since it is very easy for them to change the order after it has shipped. Is there a setting, I may have overlooked
regarding this. I have the full business version of Hikashop.

If this feature does not exist, may I propose this as part of the next upgrade. I think this is a very important feature for keeping the software secure.

Thanks.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
4 years 4 months ago #321602

Hi,

Well, if you don't trust the people with access to the order management, I would recommend to use HikaMarket multivendor:
www.hikashop.com/hikamarket-multi-vendor.html
With it, you can give them access to the orders from the frontend only and you have more advanced ACLs to allow them to deny them the different options of the interface.

Also, note that while there is no option to prevent them from changing an order once shipped, the fact that a change has been made will be logged in the history of the order, which they can't change. So if you find this happening once, you can find who did it and deal with that person accordingly.

While your suggestion is a good one we can note on our end for a future release, we are already working on other things for the next release of HikaShop. If you need us to work on it in the short term for you and provide you with a special version of HikaShop with that capability, which can then be added back in the default HikaShop, that's possible. But we'll have to charge you for the development of that feature.

Please Log in or Create an account to join the conversation.

  • Posts: 24
  • Thank you received: 0
4 years 4 months ago #321615

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>

Last edit: 4 years 4 months ago by fhmanas.

Please Log in or Create an account to join the conversation.

Time to create page: 0.059 seconds
Powered by Kunena Forum