Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
3817 Lượt xem

What is the function for reloading products after clicking new order.

const test_ReceiptScreen = (ReceiptScreen) =>
class extends ReceiptScreen {
orderDone() {
let self = this;
---> function to reload products
}
};

Registries. Component. extend(ReceiptScreen, npc_ReceiptScreen);

return ReceiptScreen;

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

To reload products in the receipt screen, you can use the load_products function. Here is an example of how you can use it:

const test_ReceiptScreen = (ReceiptScreen) => class extends ReceiptScreen { orderDone() { let self = this; self.load_products(); } };

Registries.Component.extend(ReceiptScreen, test_ReceiptScreen);

return ReceiptScreen;

In this example, the orderDone function is being overridden to include the load_products function. This function will reload the products in the receipt screen when the orderDone function is called.

Note that this example is for illustration purposes only and may need to be adapted to fit your specific use case. You may need to adjust the code to ensure that it works correctly in your environment.

Ảnh đại diện
Huỷ bỏ
Tác giả

Thank you for your response, I will definitely try it.

Tác giả

I have tried it and gave me this error 'self.load_products is not a function' am I missing something?

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 9 23
9539
1
thg 11 24
1627
4
thg 10 24
4077
1
thg 7 24
3015
0
thg 1 23
9