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

#   Show auctions in a module custom filtered

##

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

Less More

- Posts: 1
- Thank you received: 0
-
-

2 years 4 days ago [\#364611](#364611) by [iptronica](/forum/user/82820-iptronica "View iptronica's Profile")  *[Show auctions in a module custom filtered](/forum/54-auction-how-to/908907-show-auctions-in-a-module-custom-filtered#364611 "-- HikaShop version -- : 5.1.1 -- HikaAuction version -- : 4.0.0 -- Joomla version -- : 5.2.1 -- PHP version -- : 8.2  Hi,  I need to show in front page of my site, in a module, all current auctions, ordered by end date, bur only the auctions that have some bids...  Normal hikashop product content model don't have enougth configuration fields to do it. How can I do it... (I have php programing skills)  Thanks")* was created by *[iptronica](/forum/user/82820-iptronica "View iptronica's Profile")*

-- HikaShop version -- : 5.1.1
-- HikaAuction version -- : 4.0.0
-- Joomla version -- : 5.2.1
-- PHP version -- : 8.2

Hi,

I need to show in front page of my site, in a module, all current auctions, ordered by end date, bur only the auctions that have some bids...

Normal hikashop product content model don't have enougth configuration fields to do it. How can I do it... (I have php programing skills)

Thanks

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

2 years 4 days ago [\#364613](#364613) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Show auctions in a module custom filtered](/forum/54-auction-how-to/908907-show-auctions-in-a-module-custom-filtered#364613 "-- HikaShop version -- : 5.1.1 -- HikaAuction version -- : 4.0.0 -- Joomla version -- : 5.2.1 -- PHP version -- : 8.2  Hi,  I need to show in front page of my site, in a module, all current auctions, ordered by end date, bur only the auctions that have some bids...  Normal hikashop product content model don't have enougth configuration fields to do it. How can I do it... (I have php programing skills)  Thanks")*

Hi,

You'll want to:
- create a HikaShop content module via the Joomla modules manager. You'll be able to have it display the products and sort them based on the "product_sale_end" (in the "ordering column" setting).
- develop a plugin of the group "hikashop" and implement the onBeforeProductListingLoad event:
[ www.hikashop.com/support/documentation/6...reProductListingLoad](https://www.hikashop.com/support/documentation/62-hikashop-developer-documentation.html#onBeforeProductListingLoad)
In it, you first want to check $order so that you skip if $order doesn't contain product_sale_end (that way you only add the custom condition on your module products listing, and not on other product listings).
Then, you can run a MySQL query to get all the distinct auction_product_id from the hikaauction_auction table, and then you can add a filter to the $filters parameter like so: Code:

$filters[] = 'b.product_id IN ('.implode(',', $auction_product_ids).')';

I would recommend to sort by descending auction_created and limit the ids to a couple thousands maximum. Otherwise, you might en up with too much product_ids (supposing that you have a store with tens of thousands of auction products) in the condition you're adding to the product loading MySQL query.

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

Moderators: [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")

[](/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)
