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

#   Setting the default qty of a products table to 'All'

##

- **[icomex](/forum/user/4967-icomex "View icomex's Profile")**
- [![icomex's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4967.png)](/forum/user/4967-icomex "View icomex's Profile") Topic Author
- [ Offline](/forum/user/4967-icomex)

Less More

- Posts: 149
- Thank you received: 6
-
-

5 years 3 months ago [\#334792](#334792) by [icomex](/forum/user/4967-icomex "View icomex's Profile")  *[Setting the default qty of a products table to 'All'](/forum/31-development/903028-setting-the-default-qty-of-a-products-table-to-all#334792 "-- HikaShop version -- : 4.4.3 -- Joomla version -- : 3.9.28  My customer has asked me to build a print-oriented price list for his entire inventory, however, he has specific needs for the layout design: combining up to three different products which are in different top-level categories into a single row. They keep three different catalogs of identical product designs, but each catalog is made of a different material - cast stone, resin, and plaster, each with subcategories for the design styles. But not every product exists in all three. The product codes follow the convention XXXX-CS, XXXX-RS, and XXXX-PL.  The most efficient way to do this would seem to be by overriding Hikashop's Product Table display template and using the existing search data, but I don't believe there's a way to modify the product search from within the template override (probably product/listing or product/listingtable). (Adding a GroupBy parameter to the search might be handy.)  I suspect I will need a way to ensure that the list's default qty of returned items is overridden to be 'All' every time the page is loaded so that no pagination controls are needed -- I know that this may produce a long load time, but there is no choice if they want a full inventory. I plan to use the override template and css to make it reliably printable.  Is there a way to set the default list quantity to All?  Do you have any other suggestions?  Thanks.  If it were my own component, I would simply add a brand new Joomla View, but I don't think Hikashop has a way to do that without modifying the component manually, which could make updates difficult.")* was created by *[icomex](/forum/user/4967-icomex "View icomex's Profile")*

-- HikaShop version -- : 4.4.3
-- Joomla version -- : 3.9.28

My customer has asked me to build a print-oriented price list for his entire inventory, however, he has specific needs for the layout design: combining up to three different products which are in different top-level categories into a single row. They keep three different catalogs of identical product designs, but each catalog is made of a different material - cast stone, resin, and plaster, each with subcategories for the design styles. But not every product exists in all three. The product codes follow the convention XXXX-CS, XXXX-RS, and XXXX-PL.

The most efficient way to do this would seem to be by overriding Hikashop's Product Table display template and using the existing search data, but I don't believe there's a way to modify the product search from within the template override (probably product/listing or product/listingtable). (Adding a GroupBy parameter to the search might be handy.)

I suspect I will need a way to ensure that the list's default qty of returned items is overridden to be 'All' every time the page is loaded so that no pagination controls are needed -- I know that this may produce a long load time, but there is no choice if they want a full inventory. I plan to use the override template and css to make it reliably printable.

Is there a way to set the default list quantity to All?

Do you have any other suggestions?

Thanks.

If it were my own component, I would simply add a brand new Joomla View, but I don't think Hikashop has a way to do that without modifying the component manually, which could make updates difficult.

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

5 years 3 months ago [\#334793](#334793) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Setting the default qty of a products table to 'All'](/forum/31-development/903028-setting-the-default-qty-of-a-products-table-to-all#334793 "-- HikaShop version -- : 4.4.3 -- Joomla version -- : 3.9.28  My customer has asked me to build a print-oriented price list for his entire inventory, however, he has specific needs for the layout design: combining up to three different products which are in different top-level categories into a single row. They keep three different catalogs of identical product designs, but each catalog is made of a different material - cast stone, resin, and plaster, each with subcategories for the design styles. But not every product exists in all three. The product codes follow the convention XXXX-CS, XXXX-RS, and XXXX-PL.  The most efficient way to do this would seem to be by overriding Hikashop's Product Table display template and using the existing search data, but I don't believe there's a way to modify the product search from within the template override (probably product/listing or product/listingtable). (Adding a GroupBy parameter to the search might be handy.)  I suspect I will need a way to ensure that the list's default qty of returned items is overridden to be 'All' every time the page is loaded so that no pagination controls are needed -- I know that this may produce a long load time, but there is no choice if they want a full inventory. I plan to use the override template and css to make it reliably printable.  Is there a way to set the default list quantity to All?  Do you have any other suggestions?  Thanks.  If it were my own component, I would simply add a brand new Joomla View, but I don't think Hikashop has a way to do that without modifying the component manually, which could make updates difficult.")*

Hi,

The default number of elements per page is dictated by the number of columns / rows you configured in the settings of the menu item.
So if you configure 10000 rows there for your table layout, you'll get 10 000 products listed on the page when you arrive on it.
So that's not really the problem.
The real problem here is modifying the MySQL query loading the products in order to load the ones your want based on your specific conditions. This can't be done from a view override since the data is already loaded by the point you reach the view file.
You could create your own view with a plugin, but I think that's overkill for what you need.
A simpler approach is to implement the onBeforeProductListingLoad(&amp;$filters,&amp;$order,&amp;$parent, &amp;$select, &amp;$select2, &amp;$a, &amp;$b, &amp;$on) event of HikaShop ( [ www.hikashop.com/support/documentation/6...reProductListingLoad](https://www.hikashop.com/support/documentation/62-hikashop-developer-documentation.html#onBeforeProductListingLoad) ) in a plugin of the group "hikashop" so that you can directly inject the extra conditions you need to only get the products you want listed on the listing of products.
So you could configure a menu item listing all your products in a table with 10000 rows, then have a custom plugin add the necessary conditions to the MySQL query to only load the products you need on that listing, and finally, if you need to customize the look of the listing, you can use a view override of listing_table.php
Doing it like that will be way simpler than adding your own view like with do with the plugin hikashop/email_history which adds its own controller and views to the backend of HikaShop for the Customers&gt;Emails history. This plugin was a proof of concept on the system we've added to HikaShop years ago to be able to add controllers/views from a plugin.

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

- **[icomex](/forum/user/4967-icomex "View icomex's Profile")**
- [![icomex's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4967.png)](/forum/user/4967-icomex "View icomex's Profile") Topic Author
- [ Offline](/forum/user/4967-icomex)

Less More

- Posts: 149
- Thank you received: 6
-
-

5 years 3 months ago [\#334797](#334797) by [icomex](/forum/user/4967-icomex "View icomex's Profile")  Replied by *[icomex](/forum/user/4967-icomex "View icomex's Profile")* on topic *[Setting the default qty of a products table to 'All'](/forum/31-development/903028-setting-the-default-qty-of-a-products-table-to-all#334797 "-- HikaShop version -- : 4.4.3 -- Joomla version -- : 3.9.28  My customer has asked me to build a print-oriented price list for his entire inventory, however, he has specific needs for the layout design: combining up to three different products which are in different top-level categories into a single row. They keep three different catalogs of identical product designs, but each catalog is made of a different material - cast stone, resin, and plaster, each with subcategories for the design styles. But not every product exists in all three. The product codes follow the convention XXXX-CS, XXXX-RS, and XXXX-PL.  The most efficient way to do this would seem to be by overriding Hikashop's Product Table display template and using the existing search data, but I don't believe there's a way to modify the product search from within the template override (probably product/listing or product/listingtable). (Adding a GroupBy parameter to the search might be handy.)  I suspect I will need a way to ensure that the list's default qty of returned items is overridden to be 'All' every time the page is loaded so that no pagination controls are needed -- I know that this may produce a long load time, but there is no choice if they want a full inventory. I plan to use the override template and css to make it reliably printable.  Is there a way to set the default list quantity to All?  Do you have any other suggestions?  Thanks.  If it were my own component, I would simply add a brand new Joomla View, but I don't think Hikashop has a way to do that without modifying the component manually, which could make updates difficult.")*

Excellent! This site already uses a Hikashop-specific custom plugin to trigger some custom operations after certain products are purchased. I'll see if I can add the onBeforeProductListingLoad() method there, or if I need to add an additional plugin (one not within the payment group).

Thank you for the guidance!

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

5 years 3 months ago [\#334806](#334806) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Setting the default qty of a products table to 'All'](/forum/31-development/903028-setting-the-default-qty-of-a-products-table-to-all#334806 "-- HikaShop version -- : 4.4.3 -- Joomla version -- : 3.9.28  My customer has asked me to build a print-oriented price list for his entire inventory, however, he has specific needs for the layout design: combining up to three different products which are in different top-level categories into a single row. They keep three different catalogs of identical product designs, but each catalog is made of a different material - cast stone, resin, and plaster, each with subcategories for the design styles. But not every product exists in all three. The product codes follow the convention XXXX-CS, XXXX-RS, and XXXX-PL.  The most efficient way to do this would seem to be by overriding Hikashop's Product Table display template and using the existing search data, but I don't believe there's a way to modify the product search from within the template override (probably product/listing or product/listingtable). (Adding a GroupBy parameter to the search might be handy.)  I suspect I will need a way to ensure that the list's default qty of returned items is overridden to be 'All' every time the page is loaded so that no pagination controls are needed -- I know that this may produce a long load time, but there is no choice if they want a full inventory. I plan to use the override template and css to make it reliably printable.  Is there a way to set the default list quantity to All?  Do you have any other suggestions?  Thanks.  If it were my own component, I would simply add a brand new Joomla View, but I don't think Hikashop has a way to do that without modifying the component manually, which could make updates difficult.")*

Hi,

If the custom plugin you already have is of the group "hikashoppayment", you'll want to create another plugin of the group "hikashop". I don't think that the "hikashoppayment" plugins are always loaded when onBeforeProductListingLoad is triggered. It could when the cart is not empty, but it's clunky to rely on that.

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

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