Skip to content

Instantly share code, notes, and snippets.

@dfelton
Created September 16, 2020 15:28
Show Gist options
  • Save dfelton/a9bdbccca1493533c8857ad1db573848 to your computer and use it in GitHub Desktop.
Save dfelton/a9bdbccca1493533c8857ad1db573848 to your computer and use it in GitHub Desktop.
Magento 2 - Enable and show all products
./bin/magento config:set cataloginventory/options/show_out_of_stock 1
./bin/magento config:set cataloginventory/options/can_subtract 0
./bin/magento config:set cataloginventory/item_options/manage_stock 0
update catalog_product_entity_decimal
set value = '9999.99'
where attribute_id = (
  select attribute_id from eav_attribute
  where attribute_code = "price"
  and entity_type_id = (
    select entity_type_id from eav_entity_type where entity_type_code = "catalog_product"
  )
);
update catalog_product_entity_int
set value = 1
where attribute_id = (
  select attribute_id from eav_attribute
  where attribute_code = "status"
  and entity_type_id = (
    select entity_type_id from eav_entity_type where entity_type_code = "catalog_product"
  )
);
./bin/magento indexer:reset
./bin/magento indexer:reindex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment