![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/app/code/Cnc/Catalog/Setup/Patch/Data/ |
<?php /** * Copyright (c) 2020 Kaliop Digital Commerce (https://digitalcommerce.kaliop.com) All Rights Reserved. * https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) * * Hugo Herblot <[email protected]> <[email protected]> */ declare(strict_types=1); namespace Cnc\Catalog\Setup\Patch\Data; use Cnc\Catalog\Model\Config; use Cnc\Catalog\Setup\Patch\AbstractCatalogEavAttributeDataPatch; use Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface; use Magento\Eav\Setup\EavSetup; use Magento\Framework\App\ObjectManager; use Magento\Framework\Setup\Patch\DataPatchInterface; class CreateProductAttributesFromOsCommerce extends AbstractCatalogEavAttributeDataPatch implements DataPatchInterface { public $productAttributes = [ Config::PRODUCT_ATTRIBUTE_CODE_WIDTH => [ 'label' => 'Width', 'store_labels' => [ 'cnc_fr_eu' => 'Largeur' ], 'group' => Config::PRODUCT_ATTRIBUTE_GROUP_CNC, 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 10, 'filterable' => 0, 'filterable_in_search' => 0, 'used_in_product_listing' => 0, 'visible_on_front' => 0 ], Config::PRODUCT_ATTRIBUTE_CODE_LENGTH => [ 'label' => 'Lenght', 'store_labels' => [ 'cnc_fr_eu' => 'Longueur' ], 'group' => Config::PRODUCT_ATTRIBUTE_GROUP_CNC, 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 20, 'filterable' => 0, 'filterable_in_search' => 0, 'used_in_product_listing' => 0, 'visible_on_front' => 0 ], Config::PRODUCT_ATTRIBUTE_CODE_HEIGHT => [ 'label' => 'Height', 'store_labels' => [ 'cnc_fr_eu' => 'Hauteur' ], 'group' => Config::PRODUCT_ATTRIBUTE_GROUP_CNC, 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 30, 'visible_on_front' => 1, 'used_in_product_listing' => 1, 'filterable' => 0, 'filterable_in_search' => 0 ], Config::PRODUCT_ATTRIBUTE_CODE_DESCRIPTION => [ 'type' => 'text', 'input' => 'textarea', 'label' => 'Height', 'store_labels' => [ 'cnc_fr_eu' => 'Description' ], 'group' => Config::PRODUCT_ATTRIBUTE_GROUP_CONTENT, 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 35, 'visible_on_front' => 1 ], Config::PRODUCT_ATTRIBUTE_CODE_VOLTAGE => [ 'type' => 'varchar', 'input' => 'text', 'label' => 'Voltage', 'store_labels' => [ 'cnc_fr_eu' => 'Tension' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 40, 'filterable' => 1, 'filterable_in_search' => 1, 'used_in_product_listing' => 1, 'visible_on_front' => 1, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'Batteries', 'PLC', 'Power Supplies', 'Encoders & Measurement System', 'Fuses', 'Monitors & Displays', 'Servo Motors', 'Transistors', 'Servo Drives', 'Fan Motors' ] ] ], Config::PRODUCT_ATTRIBUTE_CODE_OUTPUT_RATING => [ 'type' => 'varchar', 'input' => 'text', 'label' => 'Output rating', 'store_labels' => [ 'cnc_fr_eu' => 'Intensité du courant de sortie' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 50, 'filterable' => 1, 'filterable_in_search' => 1, 'used_in_product_listing' => 1, 'visible_on_front' => 1, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'Power Supplies' ] ] ], Config::PRODUCT_ATTRIBUTE_CODE_OUTPUT_POWER => [ 'type' => 'varchar', 'input' => 'text', 'label' => 'Output Power', 'store_labels' => [ 'cnc_fr_eu' => 'Puissance de sortie' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 60, 'filterable' => 1, 'filterable_in_search' => 1, 'used_in_product_listing' => 1, 'visible_on_front' => 1, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'Power Supplies' ] ] ], Config::PRODUCT_ATTRIBUTE_CODE_INPUT_VOLTAGE => [ 'type' => 'varchar', 'input' => 'text', 'label' => 'Input Voltage', 'store_labels' => [ 'cnc_fr_eu' => 'Tension d’entrée' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 70, 'filterable' => 1, 'filterable_in_search' => 1, 'used_in_product_listing' => 1, 'visible_on_front' => 1, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'Power Supplies', 'Servo Drives' ] ] ], Config::PRODUCT_ATTRIBUTE_CODE_OUTPUT_VOLTAGE => [ 'type' => 'varchar', 'input' => 'text', 'label' => 'Output Voltage', 'store_labels' => [ 'cnc_fr_eu' => 'Tension de sortie' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 80, 'filterable' => 1, 'filterable_in_search' => 1, 'used_in_product_listing' => 1, 'visible_on_front' => 1, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'Power Supplies', 'Servo Drives' ] ] ], Config::PRODUCT_ATTRIBUTE_CODE_IP => [ 'type' => 'int', 'input' => 'select', 'label' => 'IP', 'store_labels' => [ 'cnc_fr_eu' => 'IP' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 90, 'used_in_product_listing' => 1, 'visible_on_front' => 1, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'Power Supplies', 'Servo Motors' ] ], 'option' => [ 'values' => ['IP64', 'IP65', 'IP67'] ] ], Config::PRODUCT_ATTRIBUTE_CODE_MODULE_TYPE => [ 'type' => 'varchar', 'input' => 'text', 'label' => 'Module Type', 'store_labels' => [ 'cnc_fr_eu' => 'Type de Module' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 100, 'filterable' => 1, 'filterable_in_search' => 1, 'used_in_product_listing' => 1, 'visible_on_front' => 1, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'PLC', 'Electrical products' ] ] ], Config::PRODUCT_ATTRIBUTE_CODE_NUMBER_OF_INPUTS => [ 'type' => 'int', 'input' => 'text', 'label' => 'Number of Inputs', 'store_labels' => [ 'cnc_fr_eu' => 'Nombre d’Entrées' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 110, 'used_in_product_listing' => 1, 'visible_on_front' => 1, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'PLC', 'PCB', 'Electrical products' ] ] ], Config::PRODUCT_ATTRIBUTE_CODE_NUMBER_OF_OUTPUTS => [ 'type' => 'int', 'input' => 'text', 'label' => 'Number of Outputs', 'store_labels' => [ 'cnc_fr_eu' => 'Nombre de Sorties' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 120, 'used_in_product_listing' => 1, 'visible_on_front' => 1, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'PLC', 'PCB', 'Electrical products' ] ] ], Config::PRODUCT_ATTRIBUTE_CODE_CONNECTOR => [ 'type' => 'varchar', 'input' => 'text', 'label' => 'Connector', 'store_labels' => [ 'cnc_fr_eu' => 'Connecteur' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 130, 'filterable' => 1, 'filterable_in_search' => 1, 'used_in_product_listing' => 1, 'visible_on_front' => 1, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'Batteries', 'Encoders & Measurement System', 'Monitors & Displays', 'Fan Motors' ] ] ], Config::PRODUCT_ATTRIBUTE_CODE_CAPACITY => [ 'type' => 'varchar', 'input' => 'text', 'label' => 'Capacity', 'store_labels' => [ 'cnc_fr_eu' => 'Capacité' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 140, 'used_in_product_listing' => 1, 'visible_on_front' => 1, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'Batteries', 'Encoders & Measurement System' ] ] ], Config::PRODUCT_ATTRIBUTE_CODE_FORMAT => [ 'type' => 'varchar', 'input' => 'text', 'label' => 'Format', 'store_labels' => [ 'cnc_fr_eu' => 'Format' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 150, 'used_in_product_listing' => 1, 'visible_on_front' => 1, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'Batteries' ] ] ], Config::PRODUCT_ATTRIBUTE_CODE_TECHNOLOGY => [ 'type' => 'text', 'input' => 'multiselect', 'label' => 'Technology', 'store_labels' => [ 'cnc_fr_eu' => 'Technologie' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 160, 'filterable' => 1, 'filterable_in_search' => 1, 'used_in_product_listing' => 1, 'visible_on_front' => 1, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'Batteries', 'PCB', 'Servo Drives' ] ] ], Config::PRODUCT_ATTRIBUTE_CODE_CURRENT => [ 'type' => 'varchar', 'input' => 'text', 'label' => 'Current', 'store_labels' => [ 'cnc_fr_eu' => 'Ampérage' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 170, 'used_in_product_listing' => 1, 'visible_on_front' => 1, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'Batteries', 'Power Supplies', 'Fuses', 'Servo Motors', 'Transistors', 'Servo Drives', 'Fan Motors' ] ] ], Config::PRODUCT_ATTRIBUTE_CODE_NUMBER_OF_PHASES => [ 'type' => 'int', 'input' => 'select', 'label' => 'Number of phases', 'store_labels' => [ 'cnc_fr_eu' => 'Nombre de phases' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 180, 'used_in_product_listing' => 1, 'visible_on_front' => 1, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'Servo Motors', 'Machine Mechanical Parts', 'Transistors' ] ], 'option' => [ 'values' => ['1-PH', '3-PH'] ] ], Config::PRODUCT_ATTRIBUTE_CODE_OUTPUT_CURRENT => [ 'type' => 'varchar', 'input' => 'text', 'label' => 'Output Current', 'store_labels' => [ 'cnc_fr_eu' => 'Puissance de sortie (A)' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 190, 'used_in_product_listing' => 1, 'visible_on_front' => 1, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ ] ] ], Config::PRODUCT_ATTRIBUTE_CODE_POWER_RATING => [ 'type' => 'varchar', 'input' => 'text', 'label' => 'Power Rating', 'store_labels' => [ 'cnc_fr_eu' => 'Puissance (kW)' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 200, 'filterable' => 1, 'filterable_in_search' => 1, 'used_in_product_listing' => 1, 'visible_on_front' => 1, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'Servo Motors', 'Machine Mechanical Parts', 'Transistors' ] ] ], Config::PRODUCT_ATTRIBUTE_CODE_RESISTANCE => [ 'type' => 'decimal', 'input' => 'text', 'label' => 'Resistance', 'store_labels' => [ 'cnc_fr_eu' => 'Résistance (Ohm)' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 210, 'used_in_product_listing' => 1, 'visible_on_front' => 1, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'Electrical products' ] ] ], Config::PRODUCT_ATTRIBUTE_CODE_FREQUENCY => [ 'type' => 'varchar', 'input' => 'text', 'label' => 'Frequency', 'store_labels' => [ 'cnc_fr_eu' => 'Fréquence (Hz)' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 220, 'used_in_product_listing' => 1, 'visible_on_front' => 1, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'Servo Motors', 'Servo Drives', 'Fan Motors' ] ] ], Config::PRODUCT_ATTRIBUTE_CODE_DIAMETER => [ 'type' => 'decimal', 'input' => 'text', 'label' => 'Diameter', 'store_labels' => [ 'cnc_fr_eu' => 'Diamètre (mm)' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 230, 'filterable' => 1, 'filterable_in_search' => 1, 'used_in_product_listing' => 1, 'visible_on_front' => 1, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'Batteries' ] ] ], Config::PRODUCT_ATTRIBUTE_CODE_DIMENSIONS => [ 'type' => 'decimal', 'input' => 'text', 'label' => 'Dimensions', 'store_labels' => [ 'cnc_fr_eu' => 'Dimensions' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 240, 'filterable' => 1, 'filterable_in_search' => 1, 'used_in_product_listing' => 1, 'visible_on_front' => 1, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'Batteries', 'Cables & Connectors', 'Fuses', 'Machine Mechanical Parts', 'Operator Panels & HMI', 'Servo Drives', 'Fan Motors' ] ] ], Config::PRODUCT_ATTRIBUTE_CODE_MEMORY_SIZE => [ 'type' => 'varchar', 'input' => 'text', 'label' => 'Memory size', 'store_labels' => [ 'cnc_fr_eu' => 'Capacité de mémoire' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 250, 'used_in_product_listing' => 1, 'visible_on_front' => 1, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'CNC Boards and CNC Systems' ] ] ], Config::PRODUCT_ATTRIBUTE_CODE_MEMORY_TYPE => [ 'type' => 'varchar', 'input' => 'text', 'label' => 'Memory type', 'store_labels' => [ 'cnc_fr_eu' => 'Type de mémoire' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 260, 'used_in_product_listing' => 1, 'visible_on_front' => 1, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'CNC Boards and CNC Systems' ] ] ], Config::PRODUCT_ATTRIBUTE_CODE_RESOLUTION => [ 'type' => 'int', 'input' => 'select', 'label' => 'Resolution', 'store_labels' => [ 'cnc_fr_eu' => 'Résolution' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 270, 'filterable' => 1, 'filterable_in_search' => 1, 'used_in_product_listing' => 1, 'visible_on_front' => 1, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'Encoders & Measurement System' ] ], 'option' => [ 'values' => ['1024P', '2048P', '2500P'] ] ], Config::PRODUCT_ATTRIBUTE_CODE_SHAFT_DIAMETER => [ 'type' => 'decimal', 'input' => 'text', 'label' => 'Shaft diameter', 'store_labels' => [ 'cnc_fr_eu' => 'Diamètre d’arbre' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 280, 'used_in_product_listing' => 1, 'visible_on_front' => 1, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'Encoders & Measurement System', 'Servo Motors' ] ] ], Config::PRODUCT_ATTRIBUTE_CODE_ROTATIONAL_SPEED_MAX => [ 'type' => 'varchar', 'input' => 'text', 'label' => 'Rotational speed, max', 'store_labels' => [ 'cnc_fr_eu' => 'Vitesse rotationnelle, max' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 290, 'filterable' => 1, 'filterable_in_search' => 1, 'used_in_product_listing' => 1, 'visible_on_front' => 1, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'Servo Motors' ] ] ], Config::PRODUCT_ATTRIBUTE_CODE_MONITOR_SIZE => [ 'type' => 'varchar', 'input' => 'text', 'label' => 'Monitor size', 'store_labels' => [ 'cnc_fr_eu' => 'Taille d’écran' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 300, 'filterable' => 1, 'filterable_in_search' => 1, 'used_in_product_listing' => 1, 'visible_on_front' => 1, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'Monitors & Displays', 'Operator Panels & HMI' ] ] ], Config::PRODUCT_ATTRIBUTE_CODE_MONITOR_TYPE => [ 'type' => 'int', 'input' => 'select', 'label' => 'Monitor type', 'store_labels' => [ 'cnc_fr_eu' => 'Type d’écran' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 310, 'filterable' => 1, 'filterable_in_search' => 1, 'used_in_product_listing' => 1, 'visible_on_front' => 1, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'Monitors & Displays' ] ], 'option' => [ 'values' => ['Couleur', 'Mono'] ] ], Config::PRODUCT_ATTRIBUTE_CODE_MONITOR_TECHNOLOGY => [ 'type' => 'int', 'input' => 'select', 'label' => 'Monitor technology', 'store_labels' => [ 'cnc_fr_eu' => 'Technologie d’écran' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 320, 'filterable' => 1, 'filterable_in_search' => 1, 'used_in_product_listing' => 1, 'visible_on_front' => 1, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'Monitors & Displays' ] ], 'option' => [ 'values' => ['LCD', 'CRT'] ] ], Config::PRODUCT_ATTRIBUTE_CODE_MOTOR_SHAFT_TYPE => [ 'type' => 'int', 'input' => 'select', 'label' => 'Motor shaft type', 'store_labels' => [ 'cnc_fr_eu' => 'Type d’arbre moteur' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 330, 'used_in_product_listing' => 1, 'visible_on_front' => 1, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'Servo Motors' ] ], 'option' => [ 'values' => ['Droit', 'Droit claveté', 'Conique'] ] ], Config::PRODUCT_ATTRIBUTE_CODE_BRAKE => [ 'type' => 'int', 'input' => 'select', 'label' => 'Brake', 'store_labels' => [ 'cnc_fr_eu' => 'Frein' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 340, 'filterable' => 1, 'filterable_in_search' => 1, 'used_in_product_listing' => 1, 'visible_on_front' => 1, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'Servo Motors' ] ], 'option' => [ 'values' => ['Avec Frein', 'Sans Frein'] ] ], Config::PRODUCT_ATTRIBUTE_CODE_TORQUE => [ 'type' => 'decimal', 'input' => 'text', 'label' => 'Torque', 'store_labels' => [ 'cnc_fr_eu' => 'Couple' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 350, 'used_in_product_listing' => 1, 'visible_on_front' => 1, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'Servo Motors' ] ] ], Config::PRODUCT_ATTRIBUTE_CODE_VERSION => [ 'type' => 'varchar', 'input' => 'text', 'label' => 'Version', 'store_labels' => [ 'cnc_fr_eu' => 'Version' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 360, 'used_in_product_listing' => 1, 'visible_on_front' => 1, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'PLC', 'Monitors & Displays', 'Servo Motors', 'Operator Panels & HMI', 'Servo Drives' ] ] ], Config::PRODUCT_ATTRIBUTE_CODE_MEASURING_LENGTH => [ 'type' => 'varchar', 'input' => 'text', 'label' => 'Measuring Legth', 'store_labels' => [ 'cnc_fr_eu' => 'Longueur de Mesure (ML)' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 370, 'filterable' => 1, 'filterable_in_search' => 1, 'used_in_product_listing' => 1, 'visible_on_front' => 1, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'Encoders & Measurement System' ] ] ], Config::PRODUCT_ATTRIBUTE_CODE_SALABLE_OUT_OF_STOCK => [ 'type' => 'int', 'input' => 'boolean', 'label' => 'Salable out of stock', 'store_labels' => [ 'cnc_fr_eu' => 'Vendable en rupture de stock' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 380, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'CNC Boards and CNC Systems', 'Monitors & Displays', 'Power Supplies', 'Servo Drives', 'Transistors', 'Servo Motors', 'Encoders & Measurement System', 'Fan Motors', 'Batteries', 'Keyboards & Keysheets', 'Fuses', 'Operator Panels & HMI', 'PLC', 'Cables & Connectors', 'PCB', 'Components', 'Safety Systems', 'Electrical products', 'Machine Mechanical Parts', 'Robots', 'Other' ] ] ], Config::PRODUCT_ATTRIBUTE_CODE_GUARANTEE_TYPE => [ 'type' => 'int', 'input' => 'select', 'source' => \Cnc\Catalog\Model\Attribute\Source\GuaranteeType::class, 'label' => 'Guarantee type', 'store_labels' => [ 'cnc_fr_eu' => 'Type de garantie' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 400, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'CNC Boards and CNC Systems', 'Monitors & Displays', 'Power Supplies', 'Servo Drives', 'Transistors', 'Servo Motors', 'Encoders & Measurement System', 'Fan Motors', 'Batteries', 'Keyboards & Keysheets', 'Fuses', 'Operator Panels & HMI', 'PLC', 'Cables & Connectors', 'PCB', 'Components', 'Safety Systems', 'Electrical products', 'Machine Mechanical Parts', 'Robots', 'Other' ] ] ], Config::PRODUCT_ATTRIBUTE_CODE_GUARANTEE_DURATION => [ 'type' => 'int', 'input' => 'select', 'source' => \Cnc\Catalog\Model\Attribute\Source\GuaranteeDuration::class, 'label' => 'Guarantee duration', 'store_labels' => [ 'cnc_fr_eu' => 'Durée de la garantie' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 410, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'CNC Boards and CNC Systems', 'Monitors & Displays', 'Power Supplies', 'Servo Drives', 'Transistors', 'Servo Motors', 'Encoders & Measurement System', 'Fan Motors', 'Batteries', 'Keyboards & Keysheets', 'Fuses', 'Operator Panels & HMI', 'PLC', 'Cables & Connectors', 'PCB', 'Components', 'Safety Systems', 'Electrical products', 'Machine Mechanical Parts', 'Robots', 'Other' ] ] ], Config::PRODUCT_ATTRIBUTE_CODE_STATE_OF_WEAR => [ 'type' => 'int', 'input' => 'select', 'source' => \Cnc\Catalog\Model\Attribute\Source\StateOfWear::class, 'label' => 'State of wear', 'store_labels' => [ 'cnc_fr_eu' => 'État d\'usure' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 420, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'CNC Boards and CNC Systems', 'Monitors & Displays', 'Power Supplies', 'Servo Drives', 'Transistors', 'Servo Motors', 'Encoders & Measurement System', 'Fan Motors', 'Batteries', 'Keyboards & Keysheets', 'Fuses', 'Operator Panels & HMI', 'PLC', 'Cables & Connectors', 'PCB', 'Components', 'Safety Systems', 'Electrical products', 'Machine Mechanical Parts', 'Robots', 'Other' ] ] ], Config::PRODUCT_ATTRIBUTE_CODE_NUMBER_ORDERED => [ 'type' => 'int', 'input' => 'text', 'label' => 'Number ordered', 'store_labels' => [ 'cnc_fr_eu' => 'Numéro commandé' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 430, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'CNC Boards and CNC Systems', 'Monitors & Displays', 'Power Supplies', 'Servo Drives', 'Transistors', 'Servo Motors', 'Encoders & Measurement System', 'Fan Motors', 'Batteries', 'Keyboards & Keysheets', 'Fuses', 'Operator Panels & HMI', 'PLC', 'Cables & Connectors', 'PCB', 'Components', 'Safety Systems', 'Electrical products', 'Machine Mechanical Parts', 'Robots', 'Other' ] ] ], Config::PRODUCT_ATTRIBUTE_CODE_MANUFACTURER => [ 'type' => 'int', 'input' => 'select', 'source' => \Cnc\Catalog\Model\Attribute\Source\Manufacturer::class, 'label' => 'Manufacturer', 'store_labels' => [ 'cnc_fr_eu' => 'Fabricant' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 440, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'CNC Boards and CNC Systems', 'Monitors & Displays', 'Power Supplies', 'Servo Drives', 'Transistors', 'Servo Motors', 'Encoders & Measurement System', 'Fan Motors', 'Batteries', 'Keyboards & Keysheets', 'Fuses', 'Operator Panels & HMI', 'PLC', 'Cables & Connectors', 'PCB', 'Components', 'Safety Systems', 'Electrical products', 'Machine Mechanical Parts', 'Robots', 'Other' ] ] ], Config::PRODUCT_ATTRIBUTE_CODE_CUSTOMS_CODE => [ 'type' => 'varchar', 'input' => 'text', 'label' => 'Customs code', 'store_labels' => [ 'cnc_fr_eu' => 'Code des douanes' ], 'group' => '', 'global' => ScopedAttributeInterface::SCOPE_STORE, 'sort_order' => 450, 'attribute_set' => [ Config::PRODUCT_ATTRIBUTE_GROUP_CNC, [ 'CNC Boards and CNC Systems', 'Monitors & Displays', 'Power Supplies', 'Servo Drives', 'Transistors', 'Servo Motors', 'Encoders & Measurement System', 'Fan Motors', 'Batteries', 'Keyboards & Keysheets', 'Fuses', 'Operator Panels & HMI', 'PLC', 'Cables & Connectors', 'PCB', 'Components', 'Safety Systems', 'Electrical products', 'Machine Mechanical Parts', 'Robots', 'Other' ] ] ] ]; public static function getDependencies(): array { return []; } public function apply(): void { // $objectManager = ObjectManager::getInstance(); // $state = $objectManager->get('Magento\Framework\App\State'); // // /** @var EavSetup $eavSetup */ // $eavSetup = $objectManager->create(EavSetup::class); // // foreach ($this->productAttributes as $productCode => $productAttribute) { // $eavSetup->removeAttribute('catalog_product', $productCode); // } $this->addProductAttributes(); } public function getAliases(): array { return []; } }