Beispiel #1
0
 /**
  * Update is anchor attribute (hidden frontend input, null source model, enabled by default).
  *
  * @return void
  */
 private function updateCategoryIsAnchorAttribute()
 {
     $this->eavSetup->updateAttribute(Category::ENTITY, 'is_anchor', 'frontend_input', 'hidden');
     $this->eavSetup->updateAttribute(Category::ENTITY, 'is_anchor', 'source_model', null);
     $this->updateAttributeDefaultValue(Category::ENTITY, 'is_anchor', 1, [\Magento\Catalog\Model\Category::TREE_ROOT_ID]);
 }
Beispiel #2
0
 /**
  * Upgrade Ship Bundle Items attribute
  *
  * @param EavSetup $eavSetup
  * @return void
  */
 private function upgradeShipmentType(EavSetup $eavSetup)
 {
     $eavSetup->addAttributeToGroup(ProductAttributeInterface::ENTITY_TYPE_CODE, 'Default', 'Bundle Items', 'shipment_type', 1);
     $eavSetup->updateAttribute(ProductAttributeInterface::ENTITY_TYPE_CODE, 'shipment_type', 'frontend_input', 'select');
     $eavSetup->updateAttribute(ProductAttributeInterface::ENTITY_TYPE_CODE, 'shipment_type', 'frontend_label', 'Ship Bundle Items');
     $eavSetup->updateAttribute(ProductAttributeInterface::ENTITY_TYPE_CODE, 'shipment_type', 'source_model', 'Magento\\Bundle\\Model\\Product\\Attribute\\Source\\Shipment\\Type');
     $eavSetup->updateAttribute(ProductAttributeInterface::ENTITY_TYPE_CODE, 'shipment_type', 'default_value', 0);
     $eavSetup->updateAttribute(ProductAttributeInterface::ENTITY_TYPE_CODE, 'shipment_type', 'is_visible', 1);
 }