I would like to create a layout specified for only simple product with attribute set id of 4.
currently my code is something like this:
public function initProductLayout(ResultPage $resultPage, $product, $params = null)
{
$resultPage->addPageLayoutHandles(
['attribute_set_id' => $product->getAttributeSetId()]
);
and i have this layout catalog_product_view_attribute_set_id_4.xml
its all good in the products page but my problem is that catalog_product_type_bundle.xml
is not being used. So I would like to have a layout file which is like catalog_product_type_bundle_attribute_set_id_4.xml
if it is possible.
It is possible to get the layout file you are talking about. To do this you should add this code in addition to one you already have
As a result you will get this