Plugin Debug - SortInStock Observer - Collection Data:
Collection loaded: NO
SQL:
SELECT `e`.*, `price_index`.`price`, `price_index`.`tax_class_id`, `price_index`.`final_price`, IF(price_index.tier_price IS NOT NULL, LEAST(price_index.min_price, price_index.tier_price), price_index.min_price) AS `minimal_price`, `price_index`.`min_price`, `price_index`.`max_price`, `price_index`.`tier_price`, IFNULL(review_summary.reviews_count, 0) AS `reviews_count`, IFNULL(review_summary.rating_summary, 0) AS `rating_summary`, `stock`.`stock_status` FROM `catalog_product_entity` AS `e` INNER JOIN `catalog_product_index_price` AS `price_index` ON price_index.entity_id = e.entity_id AND price_index.customer_group_id = 0 AND price_index.website_id = '1' LEFT JOIN `review_entity_summary` AS `review_summary` ON e.entity_id = review_summary.entity_pk_value AND review_summary.store_id = 1 AND review_summary.entity_type = (SELECT `review_entity`.`entity_id` FROM `review_entity` WHERE (entity_code = 'product')) LEFT JOIN `cataloginventory_stock_status` AS `stock` ON e.entity_id = stock.product_id AND stock.website_id = 0 ORDER BY `stock`.`stock_status` DESC
Position | ID | SKU | Stock Status |
---|---|---|---|
1 | 911 | 286297875467 | 0 |
2 | 900 | 286295192457 | 1 |
3 | 901 | 286294130286 | 1 |
4 | 951 | 273407820004 | 1 |
5 | 953 | 257407650009 | 0 |
6 | 1654 | 276889348003 | 0 |
7 | 916 | 276841802932 | 0 |
8 | 1657 | 276912425839 | 0 |
9 | 1661 | 276912562408 | 0 |
InstockProductsFirst Debug
SQL Query:
SELECT `e`.*, `price_index`.`price`, `price_index`.`tax_class_id`, `price_index`.`final_price`, IF(price_index.tier_price IS NOT NULL, LEAST(price_index.min_price, price_index.tier_price), price_index.min_price) AS `minimal_price`, `price_index`.`min_price`, `price_index`.`max_price`, `price_index`.`tier_price`, IFNULL(review_summary.reviews_count, 0) AS `reviews_count`, IFNULL(review_summary.rating_summary, 0) AS `rating_summary`, `stock`.`stock_status`, `stock_status_index`.`stock_status` AS `is_salable` FROM `catalog_product_entity` AS `e` INNER JOIN `catalog_product_index_price` AS `price_index` ON price_index.entity_id = e.entity_id AND price_index.customer_group_id = 0 AND price_index.website_id = '1' LEFT JOIN `review_entity_summary` AS `review_summary` ON e.entity_id = review_summary.entity_pk_value AND review_summary.store_id = 1 AND review_summary.entity_type = (SELECT `review_entity`.`entity_id` FROM `review_entity` WHERE (entity_code = 'product')) LEFT JOIN `cataloginventory_stock_status` AS `stock` ON e.entity_id = stock.product_id AND stock.website_id = 0 LEFT JOIN `cataloginventory_stock_status` AS `stock_status_index` ON e.entity_id = stock_status_index.product_id WHERE (e.entity_id IN (911, 900, 901, 951, 953, 1654, 916, 1657, 1661)) ORDER BY FIELD(e.entity_id,911,900,901,951,953,1654,916,1657,1661)
ORDER BY Clauses:
Total ORDER BY clauses: 1 Order #1: FIELD(e.entity_id,911,900,901,951,953,1654,916,1657,1661)
Stock Distribution (Total: 9 products):
Stock Status "0": 6 products
Stock Status "1": 3 products
Product Samples:
Pos | ID | SKU | Name | Stock |
---|---|---|---|---|
1 | 911 | 286297875467 | Wireless Meat Thermometer Meater Plus Di | 0 (OUT OF STOCK) |
2 | 900 | 286295192457 | Bearpaw Retro Super Shorty Size 4 Youth | 1 (IN STOCK) |
3 | 901 | 286294130286 | Traeger Timberline Outdoor Kitchen Trim | 1 (IN STOCK) |
4 | 951 | 273407820004 | Decorative Trivet Square Cast Iron Hot P | 1 (IN STOCK) |
5 | 953 | 257407650009 | Real Sand Castle Figurine 118 4" Tall Co | 0 (OUT OF STOCK) |
6 | 1654 | 276889348003 | dearfoams Kids' Good Vibes Slide Slipper | 0 (OUT OF STOCK) |
7 | 916 | 276841802932 | Otterbox Elevation 20 Tumbler Thermal Li | 0 (OUT OF STOCK) |
8 | 1657 | 276912425839 | Apple EarPods with 3.5mm Plug – Wired | 0 (OUT OF STOCK) |
9 | 1661 | 276912562408 | OtterBox Shaker Lid For Elevation 20 1.5 | 0 (OUT OF STOCK) |
Its too late afterGetLoadedProductCollection