- Posts: 25
- Thank you received: 0
Find File Which Generates Order Number
14 years 2 weeks ago #73037
by jonblk
Find File Which Generates Order Number was created by jonblk
Good Day,
I am looking for the HikaShop file which generates the 'order_number' found in the table '#_hikashop_order'. Would you be able to also tell me the exact part of the code where this order number is generated?
I also want to be able to see the insert query which writes all the information relating to an order when it is created. Could you point me to the file and the specific section of the code which performs these actions?
Thank You in advance.
I am looking for the HikaShop file which generates the 'order_number' found in the table '#_hikashop_order'. Would you be able to also tell me the exact part of the code where this order number is generated?
I also want to be able to see the insert query which writes all the information relating to an order when it is created. Could you point me to the file and the specific section of the code which performs these actions?
Thank You in advance.
Please Log in or Create an account to join the conversation.
14 years 2 weeks ago #73078
by Xavier
Replied by Xavier on topic Re: Find File Which Generates Order Number
Hi,
The order_number is generated in the file: "yourSite/administrator/components/com_hikashop/helper/helper.php" in the function "hikashop_encode()".
And the data send to the query is in the function "save()" of the file: "yourSite/administrator/components/com_hikashop/classes/order.php"
The order_number is generated in the file: "yourSite/administrator/components/com_hikashop/helper/helper.php" in the function "hikashop_encode()".
And the data send to the query is in the function "save()" of the file: "yourSite/administrator/components/com_hikashop/classes/order.php"
Please Log in or Create an account to join the conversation.
14 years 2 weeks ago #73304
by jonblk
Replied by jonblk on topic Re: Find File Which Generates Order Number
Thank You for your reply.
I am looking for the actual INSERT query which places the order number into the table along with any other associated values.
I would like to modify it so that when the INSERT is performed, I can insert whatever the generated order number is along with some SESSION variables I am using into another table.
Thank You again
I am looking for the actual INSERT query which places the order number into the table along with any other associated values.
I would like to modify it so that when the INSERT is performed, I can insert whatever the generated order number is along with some SESSION variables I am using into another table.
Thank You again
Please Log in or Create an account to join the conversation.
14 years 1 week ago #73598
by nicolas
Replied by nicolas on topic Re: Find File Which Generates Order Number
The insert query is in the yourSite/administrator/components/com_hikashop/helper/helper.php file. It's a generic query which insert all the data of all the classes in HikaShop. Each class gives to the save function in that file an object to be saved and the insert query is generated dynamically based on the attributes of that data object.
That's why Xavier directed you to the save function of the file yourSite/administrator/components/com_hikashop/classes/order.php which is where that data object is created before sending it to the generic save function of HikaShop.
That's why Xavier directed you to the save function of the file yourSite/administrator/components/com_hikashop/classes/order.php which is where that data object is created before sending it to the generic save function of HikaShop.
Please Log in or Create an account to join the conversation.
Time to create page: 0.043 seconds