Hi,
I have recently migrated my store to v4 and some functions that I had codes into v3 are not working.
The main priority for me right now is to hide any products which have the stock count as 0.
Does any one know where this query is stored and how I can correctly update it?
Before I added a line of code to the product.php file to hide out of stock items.
Thank you
IT-Me-Up
I have recently migrated my store to v4 and some functions that I had codes into v3 are not working.
The main priority for me right now is to hide any products which have the stock count as 0.
Does any one know where this query is stored and how I can correctly update it?
Before I added a line of code to the product.php file to hide out of stock items.
Thank you
IT-Me-Up
Please Check Out My Site:
https://www.IT-Me-Up.co.uk/
OC version.IT-Me-Up.co.uk wrote: ↑Fri Apr 21, 2023 10:56 pmHi,
I have recently migrated my store to v4 and some functions that I had codes into v3 are not working.
The main priority for me right now is to hide any products which have the stock count as 0.
Does any one know where this query is stored and how I can correctly update it?
Before I added a line of code to the product.php file to hide out of stock items.
Thank you
IT-Me-Up
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
First, why? Affects search engines.
Otherwise, for the category it is the getproducts() function in ../catalog/model/catalog/product.php file.
Find
and after add
That should in theory work, though I supply no guarantee as that is from memory.
Otherwise, for the category it is the getproducts() function in ../catalog/model/catalog/product.php file.
Find
Code: Select all
AND p.`status` = '1'
Code: Select all
AND p.quantity > '0'
-
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS
Version 4.0.1.1straightlight wrote: ↑Sat Apr 22, 2023 3:33 amOC version.IT-Me-Up.co.uk wrote: ↑Fri Apr 21, 2023 10:56 pmHi,
I have recently migrated my store to v4 and some functions that I had codes into v3 are not working.
The main priority for me right now is to hide any products which have the stock count as 0.
Does any one know where this query is stored and how I can correctly update it?
Before I added a line of code to the product.php file to hide out of stock items.
Thank you
IT-Me-Up
Please Check Out My Site:
https://www.IT-Me-Up.co.uk/
Thank you, this works to some extent.grgr wrote: ↑Sat Apr 22, 2023 10:38 pmFirst, why? Affects search engines.
Otherwise, for the category it is the getproducts() function in ../catalog/model/catalog/product.php file.
Findand after addCode: Select all
AND p.`status` = '1'
That should in theory work, though I supply no guarantee as that is from memory.Code: Select all
AND p.quantity > '0'
The category menu still shows 4 items (for example) when only 2 are availible but at least the out of stock items are no longer showing.
I pull my products from my supplier via an XML feed.
As they are not in stock with my supplier, I do not want to list them on my site.
Please Check Out My Site:
https://www.IT-Me-Up.co.uk/
Since your inquiry is about a feed media, this could be done directly from your extension. If you have either downloaded or purchased an extension from another extension developer or on the Marketplace, contact the extension developer or create a new service request in the Commercial Support section of the forum to get this done as a custom job.IT-Me-Up.co.uk wrote: ↑Tue May 02, 2023 8:05 pmThank you, this works to some extent.grgr wrote: ↑Sat Apr 22, 2023 10:38 pmFirst, why? Affects search engines.
Otherwise, for the category it is the getproducts() function in ../catalog/model/catalog/product.php file.
Findand after addCode: Select all
AND p.`status` = '1'
That should in theory work, though I supply no guarantee as that is from memory.Code: Select all
AND p.quantity > '0'
The category menu still shows 4 items (for example) when only 2 are availible but at least the out of stock items are no longer showing.
I pull my products from my supplier via an XML feed.
As they are not in stock with my supplier, I do not want to list them on my site.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Who is online
Users browsing this forum: No registered users and 3 guests