[Skip to main content](#vessel-content)

#   Find File Which Generates Order Number

##

- **[jonblk](/forum/user/9766-jonblk "View jonblk's Profile")**
- [![jonblk's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/9766-jonblk "View jonblk's Profile") Topic Author
- [ Offline](/forum/user/9766-jonblk)

Less More

- Posts: 25
- Thank you received: 0
-
-

14 years 2 weeks ago [\#73037](#73037) by [jonblk](/forum/user/9766-jonblk "View jonblk's Profile")  *[Find File Which Generates Order Number](/forum/4-how-to/73037-find-file-which-generates-order-number#73037 "Good Day,  I am looking for the HikaShop file which generates the 'order&#95;number' found in the table '#&#95;hikashop&#95;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.")* was created by *[jonblk](/forum/user/9766-jonblk "View jonblk's Profile")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzczMDM3LWZpbmQtZmlsZS13aGljaC1nZW5lcmF0ZXMtb3JkZXItbnVtYmVyP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

14 years 2 weeks ago [\#73078](#73078) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Re: Find File Which Generates Order Number](/forum/4-how-to/73037-find-file-which-generates-order-number#73078 "Good Day,  I am looking for the HikaShop file which generates the 'order&#95;number' found in the table '#&#95;hikashop&#95;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.")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzczMDM3LWZpbmQtZmlsZS13aGljaC1nZW5lcmF0ZXMtb3JkZXItbnVtYmVyP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[jonblk](/forum/user/9766-jonblk "View jonblk's Profile")**
- [![jonblk's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/9766-jonblk "View jonblk's Profile") Topic Author
- [ Offline](/forum/user/9766-jonblk)

Less More

- Posts: 25
- Thank you received: 0
-
-

14 years 2 weeks ago [\#73304](#73304) by [jonblk](/forum/user/9766-jonblk "View jonblk's Profile")  Replied by *[jonblk](/forum/user/9766-jonblk "View jonblk's Profile")* on topic *[Re: Find File Which Generates Order Number](/forum/4-how-to/73037-find-file-which-generates-order-number#73304 "Good Day,  I am looking for the HikaShop file which generates the 'order&#95;number' found in the table '#&#95;hikashop&#95;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.")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzczMDM3LWZpbmQtZmlsZS13aGljaC1nZW5lcmF0ZXMtb3JkZXItbnVtYmVyP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

14 years 1 week ago [\#73598](#73598) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Find File Which Generates Order Number](/forum/4-how-to/73037-find-file-which-generates-order-number#73598 "Good Day,  I am looking for the HikaShop file which generates the 'order&#95;number' found in the table '#&#95;hikashop&#95;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.")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzczMDM3LWZpbmQtZmlsZS13aGljaC1nZW5lcmF0ZXMtb3JkZXItbnVtYmVyP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.046 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
