跳至内容
菜单
此问题已终结
1 回复
3710 查看

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;

形象
丢弃
最佳答案

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.

形象
丢弃
编写者

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

编写者

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

相关帖文 回复 查看 活动
2
9月 23
9279
1
11月 24
1532
4
10月 24
3878
1
7月 24
2895
0
1月 23
9