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

#   Custom ordering for products inside an order

##

- **[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")**
- [![PeterChain's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar570.png)](/forum/user/570-peterchain "View PeterChain's Profile") Topic Author
- [ Offline](/forum/user/570-peterchain)

Less More

- Posts: 640
- Thank you received: 16
-
-

6 years 2 months ago [\#323970](#323970) by [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")  *[Custom ordering for products inside an order](/forum/35-orders-management/900796-custom-ordering-for-products-inside-an-order#323970 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.20  Hi,  Is some way to change the order appearance of the products inside an order?  We want to make appear the products of the order ordered by his product code.  We have checked the configuration and the function &quot;loadProducts&quot; of the order class and we haven't seen any trigger or option to change the ordering.  We know we can just change the query to insert the custom &quot;ORDER BY&quot; sentence, but we have to re-insert the custom code every time we update Hikashop.  We need a better way to do it, for example, a plugin trigger (like onBeforeOrderProductListDisplay or something like that) would be a good way.  Thanks in advance.  -- Victor")* was created by *[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")*

-- HikaShop version -- : 4.3.0
-- Joomla version -- : 3.9.20

Hi,

Is some way to change the order appearance of the products inside an order?

We want to make appear the products of the order ordered by his product code.

We have checked the configuration and the function "loadProducts" of the order class and we haven't seen any trigger or option to change the ordering.

We know we can just change the query to insert the custom "ORDER BY" sentence, but we have to re-insert the custom code every time we update Hikashop.

We need a better way to do it, for example, a plugin trigger (like onBeforeOrderProductListDisplay or something like that) would be a good way.

Thanks in advance.

--
Victor

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50LzkwMDc5Ni1jdXN0b20tb3JkZXJpbmctZm9yLXByb2R1Y3RzLWluc2lkZS1hbi1vcmRlcj90bXBsPW1hcmtkb3du) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86583
- Thank you received: 14324
-
-

6 years 2 months ago [\#323977](#323977) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Custom ordering for products inside an order](/forum/35-orders-management/900796-custom-ordering-for-products-inside-an-order#323977 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.20  Hi,  Is some way to change the order appearance of the products inside an order?  We want to make appear the products of the order ordered by his product code.  We have checked the configuration and the function &quot;loadProducts&quot; of the order class and we haven't seen any trigger or option to change the ordering.  We know we can just change the query to insert the custom &quot;ORDER BY&quot; sentence, but we have to re-insert the custom code every time we update Hikashop.  We need a better way to do it, for example, a plugin trigger (like onBeforeOrderProductListDisplay or something like that) would be a good way.  Thanks in advance.  -- Victor")*

Hi,

I propose to add the line:
$app-&gt;triggerEvent( 'onAfterLoadFullOrder', array( &amp;$order) );
before the return of the "loadFullOrder" function for the next version of HikaShop.
That way, you can change the order of the products in $order-&gt;products in a hikashop or system plugin.

The following user(s) said Thank You: [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50LzkwMDc5Ni1jdXN0b20tb3JkZXJpbmctZm9yLXByb2R1Y3RzLWluc2lkZS1hbi1vcmRlcj90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")**
- [![PeterChain's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar570.png)](/forum/user/570-peterchain "View PeterChain's Profile") Topic Author
- [ Offline](/forum/user/570-peterchain)

Less More

- Posts: 640
- Thank you received: 16
-
-

6 years 2 months ago [\#323990](#323990) by [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")  Replied by *[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")* on topic *[Custom ordering for products inside an order](/forum/35-orders-management/900796-custom-ordering-for-products-inside-an-order#323990 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.20  Hi,  Is some way to change the order appearance of the products inside an order?  We want to make appear the products of the order ordered by his product code.  We have checked the configuration and the function &quot;loadProducts&quot; of the order class and we haven't seen any trigger or option to change the ordering.  We know we can just change the query to insert the custom &quot;ORDER BY&quot; sentence, but we have to re-insert the custom code every time we update Hikashop.  We need a better way to do it, for example, a plugin trigger (like onBeforeOrderProductListDisplay or something like that) would be a good way.  Thanks in advance.  -- Victor")*

Thanks for the answer!!

--
Victor

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50LzkwMDc5Ni1jdXN0b20tb3JkZXJpbmctZm9yLXByb2R1Y3RzLWluc2lkZS1hbi1vcmRlcj90bXBsPW1hcmtkb3du) 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.062 seconds

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