Page 1 of 1
when new order comes i want to hear a ring bell .
Posted: Thu Sep 07, 2017 4:24 pm
by ysfagr12
Hello my friends;
i have a trouble about when new order comes to datebase ,i want to hear a ring bell,
I need to write a ajax code in admin\controller\commen\header.php ,and i have written javascript which has a sound.
how can i implement ,write this code.
Did you write this code.
Please give some codes or idea.
thank you for all efforts
Re: when new order comes i want to hear a ring bell .
Posted: Thu Sep 07, 2017 5:27 pm
by DigitCart
Hi,
You can do it this way:
If you want to do this without a page refresh, use javascript setInterval function.
Write an AJAX request to select the last order_id in the database. Save it as a variable and then compare the last order in the database with the stored order in the next request
If they were different, run the sound.
Re: when new order comes i want to hear a ring bell .
Posted: Mon Sep 11, 2017 2:22 pm
by ysfagr12
DigitCart wrote: ↑Thu Sep 07, 2017 5:27 pm
Hi,
You can do it this way:
If you want to do this without a page refresh, use javascript setInterval function.
Write an AJAX request to select the last order_id in the database. Save it as a variable and then compare the last order in the database with the stored order in the next request
If they were different, run the sound.
Can you write this code, i coud not write properly
Re: when new order comes i want to hear a ring bell .
Posted: Mon Sep 11, 2017 6:24 pm
by DigitCart
Yes, I can write it as a commercial extension.
Re: when new order comes i want to hear a ring bell .
Posted: Tue Sep 12, 2017 4:38 pm
by ysfagr12
DigitCart wrote: ↑Mon Sep 11, 2017 6:24 pm
Yes, I can write it as a commercial extension.
Well would you like to send these codes ?
Re: when new order comes i want to hear a ring bell .
Posted: Tue Sep 12, 2017 5:02 pm
by thekrotek
ysfagr12 wrote: ↑Tue Sep 12, 2017 4:38 pm
Well would you like to send these codes ?
You're missing the point here. Nobody will "send you the codes". This is a custom job, for which you will pave to pay. This is what "commercial" mean.
Re: when new order comes i want to hear a ring bell .
Posted: Sat Sep 16, 2017 6:24 pm
by DigitCart
Re: when new order comes i want to hear a ring bell .
Posted: Mon Sep 18, 2017 6:31 pm
by ysfagr12
i did myself, nobody has to pay money .This is so easy
Re: when new order comes i want to hear a ring bell .
Posted: Mon Sep 18, 2017 7:00 pm
by DigitCart
ysfagr12 wrote: ↑Mon Sep 18, 2017 6:31 pm
i did myself, nobody has to pay money .This is so easy
Glad to hear that.
Re: when new order comes i want to hear a ring bell .
Posted: Tue Sep 19, 2017 2:29 am
by IP_CAM
i did myself, nobody has to pay money .This is so easy...
Well, but why then not publish it here, so others could profit from your knowledge as well ?
Ernie