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

#   Products ordering in custom carousel module

##

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

Less More

- Posts: 73
- Thank you received: 2
-
-

10 years 11 months ago -  10 years 11 months ago [\#223333](#223333) by [mypetfly](/forum/user/39734-mypetfly "View mypetfly's Profile")  *[Products ordering in custom carousel module](/forum/43-carousel-slider/880945-products-ordering-in-custom-carousel-module#223333 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.5 -- PHP version -- : 5.3.29 -- Browser(s) name and version -- : Firefox 41.0.2 -- Error-message(debug-mod must be tuned on) -- : No message  Hello,  I am using 3rd party extension to show products as responsive carousel. It works and looks perfect, but I'd like to change products ordering (module arrange it by product id). Currently I see in the sorce code for the module following code:  $order = &quot; ORDER BY b.product&#95;id DESC&quot;; $query = &quot;SELECT DISTINCT b.product&#95;id AS id, a.category&#95;id AS catid, b.product&#95;name AS name, b.product&#95;description AS descr, b.product&#95;alias AS alias, b.product&#95;tax&#95;id AS tax FROM #&#95;&#95;hikashop&#95;product&#95;category AS a LEFT JOIN #&#95;&#95;hikashop&#95;product AS b ON a.product&#95;id = b.product&#95;id WHERE product&#95;published = 1 &quot;.$where.&quot; GROUP BY b.product&#95;id &quot;.$order;  I'd like to use hikashop ordering (when &quot;Direct sub elements&quot; is selected). How I can implements this? Which hikashop tables store ordering?")* was created by *[mypetfly](/forum/user/39734-mypetfly "View mypetfly's Profile")*

-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4.5
-- PHP version -- : 5.3.29
-- Browser(s) name and version -- : Firefox 41.0.2
-- Error-message(debug-mod must be tuned on) -- : No message

Hello,

I am using 3rd party extension to show products as responsive carousel. It works and looks perfect, but I'd like to change products ordering (module arrange it by product id). Currently I see in the sorce code for the module following code:

$order = " ORDER BY b.product_id DESC";
$query = "SELECT DISTINCT b.product_id AS id, a.category_id AS catid, b.product_name AS name, b.product_description AS descr, b.product_alias AS alias, b.product_tax_id AS tax
FROM #__hikashop_product_category AS a
LEFT JOIN #__hikashop_product AS b ON a.product_id = b.product_id
WHERE product_published = 1 ".$where." GROUP BY b.product_id ".$order;

I'd like to use hikashop ordering (when "Direct sub elements" is selected). How I can implements this?
Which hikashop tables store ordering?

Last edit: 10 years 11 months ago by [mypetfly](/forum/user/39734-mypetfly "View mypetfly's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQzLWNhcm91c2VsLXNsaWRlci84ODA5NDUtcHJvZHVjdHMtb3JkZXJpbmctaW4tY3VzdG9tLWNhcm91c2VsLW1vZHVsZT90bXBsPW1hcmtkb3du) 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: 86587
- Thank you received: 14325
-
-

10 years 11 months ago [\#223338](#223338) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Products ordering in custom carousel module](/forum/43-carousel-slider/880945-products-ordering-in-custom-carousel-module#223338 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.5 -- PHP version -- : 5.3.29 -- Browser(s) name and version -- : Firefox 41.0.2 -- Error-message(debug-mod must be tuned on) -- : No message  Hello,  I am using 3rd party extension to show products as responsive carousel. It works and looks perfect, but I'd like to change products ordering (module arrange it by product id). Currently I see in the sorce code for the module following code:  $order = &quot; ORDER BY b.product&#95;id DESC&quot;; $query = &quot;SELECT DISTINCT b.product&#95;id AS id, a.category&#95;id AS catid, b.product&#95;name AS name, b.product&#95;description AS descr, b.product&#95;alias AS alias, b.product&#95;tax&#95;id AS tax FROM #&#95;&#95;hikashop&#95;product&#95;category AS a LEFT JOIN #&#95;&#95;hikashop&#95;product AS b ON a.product&#95;id = b.product&#95;id WHERE product&#95;published = 1 &quot;.$where.&quot; GROUP BY b.product&#95;id &quot;.$order;  I'd like to use hikashop ordering (when &quot;Direct sub elements&quot; is selected). How I can implements this? Which hikashop tables store ordering?")*

Hi,

Change b.product_id by a.ordering in your query and that should do it.

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

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

Less More

- Posts: 73
- Thank you received: 2
-
-

10 years 11 months ago [\#223522](#223522) by [mypetfly](/forum/user/39734-mypetfly "View mypetfly's Profile")  Replied by *[mypetfly](/forum/user/39734-mypetfly "View mypetfly's Profile")* on topic *[Products ordering in custom carousel module](/forum/43-carousel-slider/880945-products-ordering-in-custom-carousel-module#223522 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.5 -- PHP version -- : 5.3.29 -- Browser(s) name and version -- : Firefox 41.0.2 -- Error-message(debug-mod must be tuned on) -- : No message  Hello,  I am using 3rd party extension to show products as responsive carousel. It works and looks perfect, but I'd like to change products ordering (module arrange it by product id). Currently I see in the sorce code for the module following code:  $order = &quot; ORDER BY b.product&#95;id DESC&quot;; $query = &quot;SELECT DISTINCT b.product&#95;id AS id, a.category&#95;id AS catid, b.product&#95;name AS name, b.product&#95;description AS descr, b.product&#95;alias AS alias, b.product&#95;tax&#95;id AS tax FROM #&#95;&#95;hikashop&#95;product&#95;category AS a LEFT JOIN #&#95;&#95;hikashop&#95;product AS b ON a.product&#95;id = b.product&#95;id WHERE product&#95;published = 1 &quot;.$where.&quot; GROUP BY b.product&#95;id &quot;.$order;  I'd like to use hikashop ordering (when &quot;Direct sub elements&quot; is selected). How I can implements this? Which hikashop tables store ordering?")*

This helped, thank you very much!

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

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