Magento – Magento 2 – Product Customizable Options is not showing on frontend

custom-optionscustomizable-optionsmagento2magento2.3product

i create a product with Customizable Options but sometimes at frontend, the place which custom options should have appeared is now nothing
enter image description here

I'm not sure why it happen, but when i resaving the product seems to solve that.
Any idea what's the cause? How to prevent that? How to fix that for all products without resaving them all?

Best Answer

After create or update product attribute programmatically (like tier price , etc..) by mistake product has_option set with false value.

check in "catalog_product_entity" table.

select entity_id, has_options, sku from `catalog_product_entity` where  sku = {sky of yourproduct}

So update it if has_options value is zero or null.

UPDATE `catalog_product_entity` set has_options =1 where  sku = {sky of yourproduct} 

As describe @Gulshan. find out and update product which has_options column value are false.

SELECT * FROM `catalog_product_entity` WHERE entity_id in (SELECT product_id FROM `catalog_product_option`) and has_options = 0;

And update it with update query. Before update keep backup for table "catalog_product_entity" table.

UPDATE `catalog_product_entity` set has_options =1 where entity_id in (SELECT product_id FROM `catalog_product_option`) and has_options = 0 ;

Refresh cache and check product detail page.

Related Topic