Products ordering in custom carousel module

  • Posts: 73
  • Thank you received: 2
8 years 11 months ago #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 = " 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: 8 years 11 months ago by mypetfly.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
8 years 11 months ago #223338

Hi,

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

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

  • Posts: 73
  • Thank you received: 2
8 years 11 months ago #223522

This helped, thank you very much!

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

Time to create page: 0.059 seconds
Powered by Kunena Forum