Find File Which Generates Order Number

  • Posts: 25
  • Thank you received: 0
12 years 2 weeks ago #73037

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.

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
12 years 2 weeks ago #73078

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"

Please Log in or Create an account to join the conversation.

  • Posts: 25
  • Thank you received: 0
12 years 2 weeks ago #73304

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

Please Log in or Create an account to join the conversation.

  • Posts: 82818
  • Thank you received: 13361
  • MODERATOR
12 years 2 weeks ago #73598

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.

Please Log in or Create an account to join the conversation.

Time to create page: 0.104 seconds
Powered by Kunena Forum