I'm sorry, I think I made a booboo in my posts LOL, the line I added apparently was
and p.products_ordered > 0
And because I have stock/quantity disabled, I didn't add it in the second section, I think the products quantity was already there maybe? If you add the above line to both sections, as highlighted it should work for you
Code:
if (BEST_SELLERS_SHOW_OUT_OF_STOCK == 'true') {
$listing_sql = "SELECT p.products_type, p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id,
p.products_date_added, m.manufacturers_name, p.products_model, p.products_quantity, p.products_weight, p.product_is_call,
p.product_is_always_free_shipping, p.products_qty_box_status,
p.master_categories_id
FROM " . TABLE_PRODUCTS . " p
LEFT JOIN " . TABLE_MANUFACTURERS . " m ON (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd
WHERE p.products_status = 1
and p.products_ordered > 0
AND p.products_id = pd.products_id
AND pd.language_id = :languageID " .
"order by p.products_ordered desc ". $order_by;
} else {
$listing_sql = "SELECT p.products_type, p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id,
p.products_date_added, m.manufacturers_name, p.products_model, p.products_quantity, p.products_weight, p.product_is_call,
p.product_is_always_free_shipping, p.products_qty_box_status,
p.master_categories_id
FROM " . TABLE_PRODUCTS . " p
LEFT JOIN " . TABLE_MANUFACTURERS . " m ON (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd
WHERE p.products_status = 1
and p.products_ordered > 0
AND p.products_quantity > 0
AND p.products_id = pd.products_id
AND pd.language_id = :languageID " .
"order by p.products_ordered desc ". $order_by;
}
A tiny bit of knowledge mixed with blonde can be dangerous it seems LOL
Can one of the mods maybe go back and edit my previous post on this or delete it?
Bookmarks