maybe I misunderstood the meaning of the pre-order stock status and the date_available field in the product table of the database. Actually for sure I did!
Anyway, here's my problem.
I receive a csv file from my provider and I use that file to update the stock levels of the items. What I do is an update of the quantity field in the product table and, if the publication date (I do sell books) is in the future, I update the date_available and the stock_status_id fields as well setting stock_status_id to 8 (pre order).
In addition I have enabled "Stock Checkout" from SYSTEM > SETTINGS > [store] > Option in the admin area.
Of course it's not working because of the query constraints in model/catalog/product:
Code: Select all
AND p.date_available <= NOW()
but even removing that where clause nothing happens.
In addition i need to display as OUT OF STOCK those items with quantity <= 5 but I don't find any restriction on quantities in the getProducts method.