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

#   Plugin for number\_of\_products query

##

- **[jesper](/forum/user/8151-jesper "View jesper's Profile")**
- [![jesper's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/dog.png)](/forum/user/8151-jesper "View jesper's Profile") Topic Author
- [ Offline](/forum/user/8151-jesper)

Less More

- Posts: 171
- Thank you received: 4
-
-

13 years 8 months ago [\#93584](#93584) by [jesper](/forum/user/8151-jesper "View jesper's Profile")  *[Plugin for number\_of\_products query](/forum/2-general-talk-about-hikashop/79090-plugin-for-number-of-products-query#93584 "Hi  I recently used this very nice little plugin to hide products out of the sales date range (  www.hikashop.com/en/forum/4-how-to/31934...sale-date.html#92772 )  However I have run into a bit of a problem. I'm also using the category view to show how many products are currently on the site, but the number&#95;of&#95;products query in views/category/view.html.php line 303 is hardcoded so that I cannot enforce the same filter on the count of products as I do on the product listing.  I would like to suggest that this query is somehow made dependent on the filters for the normal product listing query, so the numbers will match the actual number of products shown on the site.")* was created by *[jesper](/forum/user/8151-jesper "View jesper's Profile")*

Hi

I recently used this very nice little plugin to hide products out of the sales date range ([ www.hikashop.com/en/forum/4-how-to/31934...sale-date.html#92772](http://www.hikashop.com/en/forum/4-how-to/31934-start-a-end-sale-date.html#92772))

However I have run into a bit of a problem. I'm also using the category view to show how many products are currently on the site, but the number_of_products query in views/category/view.html.php line 303 is hardcoded so that I cannot enforce the same filter on the count of products as I do on the product listing.

I would like to suggest that this query is somehow made dependent on the filters for the normal product listing query, so the numbers will match the actual number of products shown on the site.

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26400
- Thank you received: 4080
-
- [](http://obsi.dev)
-

13 years 8 months ago [\#93719](#93719) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Plugin for number\_of\_products query](/forum/2-general-talk-about-hikashop/79090-plugin-for-number-of-products-query#93719 "Hi  I recently used this very nice little plugin to hide products out of the sales date range (  www.hikashop.com/en/forum/4-how-to/31934...sale-date.html#92772 )  However I have run into a bit of a problem. I'm also using the category view to show how many products are currently on the site, but the number&#95;of&#95;products query in views/category/view.html.php line 303 is hardcoded so that I cannot enforce the same filter on the count of products as I do on the product listing.  I would like to suggest that this query is somehow made dependent on the filters for the normal product listing query, so the numbers will match the actual number of products shown on the site.")*

Hi,

We have another plugin which would unpublish the products which have a past "sale end date".
I have to check if the URL is right but I guess it's:
[ www.hikashop.com/en/component/updateme/c...\_productexpired.html](http://www.hikashop.com/en/component/updateme/ctrl-download/plugin-cron_productexpired.html)

With this plugins, the products would be unpublished so the category listing would display the right number of products.

Best regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

- **[jesper](/forum/user/8151-jesper "View jesper's Profile")**
- [![jesper's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/dog.png)](/forum/user/8151-jesper "View jesper's Profile") Topic Author
- [ Offline](/forum/user/8151-jesper)

Less More

- Posts: 171
- Thank you received: 4
-
-

13 years 8 months ago [\#93882](#93882) by [jesper](/forum/user/8151-jesper "View jesper's Profile")  Replied by *[jesper](/forum/user/8151-jesper "View jesper's Profile")* on topic *[Plugin for number\_of\_products query](/forum/2-general-talk-about-hikashop/79090-plugin-for-number-of-products-query#93882 "Hi  I recently used this very nice little plugin to hide products out of the sales date range (  www.hikashop.com/en/forum/4-how-to/31934...sale-date.html#92772 )  However I have run into a bit of a problem. I'm also using the category view to show how many products are currently on the site, but the number&#95;of&#95;products query in views/category/view.html.php line 303 is hardcoded so that I cannot enforce the same filter on the count of products as I do on the product listing.  I would like to suggest that this query is somehow made dependent on the filters for the normal product listing query, so the numbers will match the actual number of products shown on the site.")*

Oh, thank you very much ![:)](/media/kunena/emoticons/3.png ":)")

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

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