If want to add the simple products with custom options to configurable product.When you want show custom options and simple products for configurable product.
when we save product that time if custom options having of that product while saving time in database catalog_product_entity table required_options will update as 1 if not having it updating as 0. Based on this field configuration data filtering If take a look in to this file you will get idea public_html\vendor\magento\module-configurable-product\Model\Product\Type\Configurable.php
In this file found below function private function getConfiguredUsedProductCollection
In this file found below function private function getConfiguredUsedProductCollection
code around line
present code below function line number 1408 to 1411
private function getConfiguredUsedProductCollection(
\Magento\Catalog\Model\Product $product,
$skipStockFilter = true
)
$collection
->addAttributeToSelect($this->getAttributesForCollection($product))
->addFilterByRequiredOptions()
->setStoreId($product->getStoreId());
i change like this
$collection
->addAttributeToSelect($this->getAttributesForCollection($product))
//->addFilterByRequiredOptions()
->setStoreId($product->getStoreId());
now you will able to see associated simple products and custom options with config products
Unisoft Informatics is the Top Magento Development Company who serve their services for every business sector namely healthcare, education sector, real estate website services, mobile app development services, and more. We help you to generate more revenue through the website.
ReplyDeleteOutsource Laravel Development Company to build an online store with full-fledged features. Unisoft Informatics is the Top Laravel Development Company who provide website design and development services for all business industry no matter how large it is!
ReplyDelete