- Posts: 640
- Thank you received: 16
Custom ordering for products inside an order
- PeterChain
-
Topic Author
- Offline
Less
More
6 years 2 weeks ago #323970
by PeterChain
Custom ordering for products inside an order was created by PeterChain
-- 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
-- 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 or Create an account to join the conversation.
6 years 2 weeks ago #323977
by nicolas
Replied by nicolas on topic Custom ordering for products inside an order
Hi,
I propose to add the line:
$app->triggerEvent( 'onAfterLoadFullOrder', array( &$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->products in a hikashop or system plugin.
I propose to add the line:
$app->triggerEvent( 'onAfterLoadFullOrder', array( &$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->products in a hikashop or system plugin.
The following user(s) said Thank You: PeterChain
Please Log in or Create an account to join the conversation.
- PeterChain
-
Topic Author
- Offline
Less
More
- Posts: 640
- Thank you received: 16
6 years 2 weeks ago #323990
by PeterChain
Replied by PeterChain on topic Custom ordering for products inside an order
Thanks for the answer!!
--
Victor
--
Victor
Please Log in or Create an account to join the conversation.
Time to create page: 0.176 seconds