Post by pixacor » Sun Aug 29, 2021 3:43 am

I have searched and am not finding an obvious answer to remove products after they are out of stock. We have a section that runs with items specific that are QTY 1 and once sold we need it to disappear. I do this currently in an old version of 1.5 but I cannot seem to find it in 3? When I search all I find is modules which suggests there is no built in option?

Thanks for any tips.

New member

Posts

Joined
Mon Jul 29, 2019 12:55 am

Post by straightlight » Sun Aug 29, 2021 6:43 am

pixacor wrote:
Sun Aug 29, 2021 3:43 am
I have searched and am not finding an obvious answer to remove products after they are out of stock. We have a section that runs with items specific that are QTY 1 and once sold we need it to disappear. I do this currently in an old version of 1.5 but I cannot seem to find it in 3? When I search all I find is modules which suggests there is no built in option?

Thanks for any tips.
https://www.opencart.com/index.php?rout ... n_id=32496

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Moaid1888 » Mon Aug 30, 2021 5:24 pm

Go to catalog/model/catalog/product.php
replace
AND p.date_available <= NOW()
with:
AND p.date_available <= NOW() AND p.quantity > 0

Newbie

Posts

Joined
Thu Oct 22, 2020 5:45 pm
Who is online

Users browsing this forum: No registered users and 45 guests