- Posts: 240
- Thank you received: 13
Order Status Change
3 years 8 months ago #348065
by khashiz
Order Status Change was created by khashiz
-- HikaShop version -- : 4.7
-- Joomla version -- : 4.2.6
-- PHP version -- : 8.1
Hi.
I know that there is a gret possibility in Hikashop to change the order status via mass actions.
what I need, is to change the order status by runnig a php script by opening a url.
in my website , users order history url is this : domain.com/orders
for exampe, to change the order status of order number 425, by opening a URL like this :
my-domain.com/orders/order-425?order_status=cancel
is that possible ?
-- Joomla version -- : 4.2.6
-- PHP version -- : 8.1
Hi.
I know that there is a gret possibility in Hikashop to change the order status via mass actions.
what I need, is to change the order status by runnig a php script by opening a url.
in my website , users order history url is this : domain.com/orders
for exampe, to change the order status of order number 425, by opening a URL like this :
my-domain.com/orders/order-425?order_status=cancel
is that possible ?
Please Log in or Create an account to join the conversation.
3 years 8 months ago #348068
by nicolas
Replied by nicolas on topic Order Status Change
Hi,
Well, it depends.
If the order was made by a guest, then it's possible to change the status of the order to cancelled by requesting the URL:
where XXX is the id of the order and YYY is the token of the order (which guarantees that the person cancelling the order is the same person who placed the order).
If the order was made by someone connected with a user account, then that same URL, without the order_token parameter can be used, but only by someone logged in on the frontend of the website with the user account of that person (again for security reasons).
There is no mechanism to change the order status of orders to someone else from an URL. It would require some authentication mechanism, to make sure the person calling that URL has the authority to do that.
Now, it would be possible to develop a small plugin to answer calls to a special URL with code in the plugin to be able to change the order information. We actually developed a plugin which, appart from other things can also receive such requests to change the order status but also other things of an order.
Well, it depends.
If the order was made by a guest, then it's possible to change the status of the order to cancelled by requesting the URL:
Code:
my-domain.com/index.php?option=com_hikashop&ctrl=order&task=cancel_order&order_id=XXX&order_token=YYY
If the order was made by someone connected with a user account, then that same URL, without the order_token parameter can be used, but only by someone logged in on the frontend of the website with the user account of that person (again for security reasons).
There is no mechanism to change the order status of orders to someone else from an URL. It would require some authentication mechanism, to make sure the person calling that URL has the authority to do that.
Now, it would be possible to develop a small plugin to answer calls to a special URL with code in the plugin to be able to change the order information. We actually developed a plugin which, appart from other things can also receive such requests to change the order status but also other things of an order.
Please Log in or Create an account to join the conversation.
3 years 8 months ago #348070
by khashiz
Replied by khashiz on topic Order Status Change
thank you for the answer.
let me explain my exact need.
i'm selling restaurant tickets on my website using hikashop.
I was thinking to put a QR code on the printed order information in which when the QR code is scanned by the restaurant manager, order status be changed from "confirmed" to "used" that means the ticket is used and can not be used again ...
let me explain my exact need.
i'm selling restaurant tickets on my website using hikashop.
I was thinking to put a QR code on the printed order information in which when the QR code is scanned by the restaurant manager, order status be changed from "confirmed" to "used" that means the ticket is used and can not be used again ...
Please Log in or Create an account to join the conversation.
3 years 8 months ago #348073
by nicolas
Replied by nicolas on topic Order Status Change
Hi,
In that case, you should use HikaSerial:
www.hikashop.com/component/hikashop/product/17-hikaserial.html
It will allow you to easily generate a QR code for each product purchase. And HikaSerial also has a consume feature to validate each QR code:
www.hikashop.com/support/documentation/2...ticket-tutorial.html
www.hikashop.com/support/documentation/1...onsume-features.html
Without HikaSerial, it would require quite a bit of development to generate the QR code and add it to the order, and then handle the scanning and validation. So I really recommand looking into HikaSerial because I think it will fit nicely with your requirements.
In that case, you should use HikaSerial:
www.hikashop.com/component/hikashop/product/17-hikaserial.html
It will allow you to easily generate a QR code for each product purchase. And HikaSerial also has a consume feature to validate each QR code:
www.hikashop.com/support/documentation/2...ticket-tutorial.html
www.hikashop.com/support/documentation/1...onsume-features.html
Without HikaSerial, it would require quite a bit of development to generate the QR code and add it to the order, and then handle the scanning and validation. So I really recommand looking into HikaSerial because I think it will fit nicely with your requirements.
Please Log in or Create an account to join the conversation.
3 years 8 months ago #348076
by khashiz
Replied by khashiz on topic Order Status Change
Thank you alot
What i want to know is that if i use Hikaserial, is there any option to mark a ticket as “used” ?
What i want to know is that if i use Hikaserial, is there any option to mark a ticket as “used” ?
Please Log in or Create an account to join the conversation.
3 years 8 months ago #348080
by nicolas
Replied by nicolas on topic Order Status Change
Hi,
Yes, that's what the "consume" mechanism does.
Yes, that's what the "consume" mechanism does.
Please Log in or Create an account to join the conversation.
3 years 8 months ago #348081
by khashiz
Replied by khashiz on topic Order Status Change
and that consume option can be used with QR qode ?
there are tablets on the enterance of the restaurant, i want the ticket be marked as used with scanning the QR code in the enterance
is that possible ?
there are tablets on the enterance of the restaurant, i want the ticket be marked as used with scanning the QR code in the enterance
is that possible ?
Please Log in or Create an account to join the conversation.
3 years 8 months ago #348086
by nicolas
Replied by nicolas on topic Order Status Change
Yes, it can be used with the QR code generator.
It's totally possible provided the QR Code scanner has access to the internet to request the URL of the QR code. The links I gave in this message www.hikashop.com/forum/orders-management...s-change.html#348073 explain on to set this up.
The example there is the sale of a ticket:
- someone purchase a ticket product
- HikaSerial generate a ticket number for the purchase (serial)
- HikaShop generates a ticket image (or PDF) with the consume URL of the serial as QR code
- when arriving to the venue, the customer provides the ticket with the QR code and the person at the entrance scans it (with a smartphone for example)
- this will trigger the consume mechanism. Either no one has already provided the QR code and the serial will be consumed and the person at the entrance will see a success message, or someone has already entered with that QR code and the person will see an error message.
It's totally possible provided the QR Code scanner has access to the internet to request the URL of the QR code. The links I gave in this message www.hikashop.com/forum/orders-management...s-change.html#348073 explain on to set this up.
The example there is the sale of a ticket:
- someone purchase a ticket product
- HikaSerial generate a ticket number for the purchase (serial)
- HikaShop generates a ticket image (or PDF) with the consume URL of the serial as QR code
- when arriving to the venue, the customer provides the ticket with the QR code and the person at the entrance scans it (with a smartphone for example)
- this will trigger the consume mechanism. Either no one has already provided the QR code and the serial will be consumed and the person at the entrance will see a success message, or someone has already entered with that QR code and the person will see an error message.
The following user(s) said Thank You: khashiz
Please Log in or Create an account to join the conversation.
3 years 8 months ago #348144
by khashiz
Replied by khashiz on topic Order Status Change
That is my exact need.
Thank you alot
Thank you alot
Please Log in or Create an account to join the conversation.
Time to create page: 0.247 seconds