1

I created attribute for configurable products. I want to create a page using that attribute. I selected the Catalog Product List option in widget. But i can not see added attribute in the dropdown.

Please find the attachments and help me. enter image description here enter image description here

1 Answer 1

0

This issue was reported, which state that Magento exclude attributes that have the Catalog Input Type for Store Owner (frontend_input) set to Text Field. It has been fixed in Magento 2.4.6.

The related Git commit: https://github.com/magento/magento2/commit/008205bd0dca913a17a161d805dfcf66da4f2e69

Based on this change, I have created a patch for Magento 2.4.4 and 2.4.5:

diff --git a/vendor/module-catalog-widget/Model/Rule/Condition/Product.php b/vendor/module-catalog-widget/Model/Rule/Condition/Product.php
index 41f23d9..6927e10 100644
--- a/vendor/module-catalog-widget/Model/Rule/Condition/Product.php
+++ b/vendor/module-catalog-widget/Model/Rule/Condition/Product.php
@@ -9,7 +9,6 @@
  */
 namespace Magento\CatalogWidget\Model\Rule\Condition;

-use Magento\Catalog\Api\Data\ProductInterface;
 use Magento\Catalog\Model\ProductCategoryList;
 use Magento\Catalog\Model\ResourceModel\Product\Collection;
 use Magento\Store\Model\Store;
@@ -87,9 +86,7 @@ class Product extends \Magento\Rule\Model\Condition\Product\AbstractProduct
         $productAttributes = array_filter(
             $productAttributes,
             function ($attribute) {
-                return $attribute->getFrontendLabel() &&
-                    $attribute->getFrontendInput() !== 'text' &&
-                    $attribute->getAttributeCode() !== ProductInterface::STATUS;
+                return $attribute->getFrontendLabel();
             }
         );

For instructions on how to apply composer patches, please refer to this document: https://experienceleague.adobe.com/docs/commerce-operations/upgrade-guide/patches/apply.html?lang=en#composer

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.