PV
Asked
Can I not show brand or category with 0 quantity on SHOP?
I don't want the customer to experience the brand or category that has product but no qty.
by default I set the products to load only the items those are not 0 qty but on the menu of category or brand still show up, but some of them when we click it just show nothing because those brands or categories contain products but 0 QTY.
is there anyway to fix that?
I don't want the customer to experience the brand or category that has product but no qty.
by default I set the products to load only the items those are not 0 qty but on the menu of category or brand still show up, but some of them when we click it just show nothing because those brands or categories contain products but 0 QTY.
is there anyway to fix that?
Attachments
- MSAnsweredHello,
You can try to run following query after selecting your database
```SQL
UPDATE `sma_shop_settings` SET `hide0` = '1' WHERE `shop_id` = '1';
```
Thank you - PVAnsweredcould you be more specific? where is the controller file should I go to edit and which line? I mean is there any indicator to get to it?
- MSAnsweredThe code I given is not for controller. It's SQL query to run at your database by command line or any gui phpmyadmin or workbench or tableplus etc.
- PVAnsweredoh, but I want to run this on my shop.
I want only products with > 0 qty and for brands or category those are have products with 0 qty I don't want them to show. - PVAnsweredI have already run but there is nothing change on the shop.
that is why I want to know which controller can I modify to show only the products with > 0 qty and hide brand and category those are not have products > 0 qty?
see my attachmentAttachments - MSAnsweredHello,
Yes, query looks fine. If it's didn't hide the categories/brands then you will need to edit `app/core/MY_Shop_Controller.php` and `app/models/shop/Shop_model.php`
Thank you - PVAnsweredis there any coding snippets ? I mean which id or line or indicator?
- MSAnsweredHello,
I am sorry as I can't provide snippets. You can modify any file as per your requirements.
Thank you - PVAnsweredI see this one, but it seems like I dont see anywhere to change to match my requirement.
could you help? - PVAnswered**[Mian Saleem](/u/saleem)** Hello support,
I just realized that I have asked this question last 2 years, and I now updated to the latest version but still the brands and categories with no products still appears on Shop page.
would you guide a bit about where to adjust or kind of query?
Thank you - Login to Reply