- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2018
03:50 AM
06-21-2018
03:50 AM
Problems While Creating Product Attribute With InstallData
I've created InstallData for creating product attribute with default options to be set yes like,
used_in_product_listing and is_used_for_promo_rules
Probelm is only used_in_product_listing is setting up to Yes while execute InstallData not for Promo Code Rule.
$eavSetup->addAttribute( \Magento\Catalog\Model\Product::ENTITY, 'brands', [ 'type' => 'text', 'backend' => 'Magento\Eav\Model\Entity\Attribute\Backend\ArrayBackend', 'frontend' => '', 'label' => 'Brands', 'input' => 'select', 'group' => 'General', 'class' => 'brands', 'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL, 'visible' => true, 'required' => false, 'user_defined' => true, 'default' => '1', 'searchable' => false, 'filterable' => false, 'comparable' => false, 'visible_on_front' => false, 'is_used_for_promo_rules' => true, 'used_in_product_listing' => true, 'unique' => false ] );
Any Ideas ?
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2019
01:12 PM
02-20-2019
01:12 PM
Re: Problems While Creating Product Attribute With InstallData
change: 'is_used_for_promo_rules'
to: 'used_for_promo_rules'