Can I not show brand or category with 0 quanty

0

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?

Question Resolved For: Stock Manager Advance with All Modules 0 Votes 12 Answers 1.2k Views
Asked by Prom Vongchann 3 years ago

0

Answered by Mian Saleem 3 years ago

Hello,

You can try to run following query after selecting your database

UPDATE `sma_shop_settings` SET `hide0` = '1' WHERE `shop_id` = '1';

Thank you

0

Answered by Prom Vongchann 3 years ago

could 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?

0

Answered by Mian Saleem 3 years ago

The 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.

0

Answered by Prom Vongchann 3 years ago

oh, 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.

0

Answered by Prom Vongchann 3 years ago

I 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 attachment

0

Answered by Mian Saleem 3 years ago

Hello,

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

0

Answered by Prom Vongchann 3 years ago

is there any coding snippets ? I mean which id or line or indicator?

0

Answered by Mian Saleem 3 years ago

Hello,

I am sorry as I can't provide snippets. You can modify any file as per your requirements.

Thank you

0

Answered by Prom Vongchann 3 years ago

I see this one, but it seems like I dont see anywhere to change to match my requirement.
could you help?

0

Answered by Prom Vongchann 1 year ago

Mian 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

We use Cookies

We use cookies to ensure that we give you the best experience on our website. By continuing to browse the site you are agreeing to our use of cookies.