I'm using magento 2.4, i just created a new product attribute like this:

            'type' => 'text',
            'label' => 'Brand History',
            'input' => 'textarea',
            'source' => '',
            'frontend' => '',
            'required' => false,
            'backend' => '',
            'sort_order' => '74',
            'global' => ScopedAttributeInterface::SCOPE_STORE,
            'visible' => true,
            'user_defined' => true,
            'searchable' => false,
            'filterable' => false,
            'comparable' => false,
            'visible_on_front' => false,
            'unique' => false,
            'group' => 'General',
            'used_in_product_listing' => false,
            'is_used_in_grid' => true,
            'is_visible_in_grid' => false,
            'is_filterable_in_grid' => false,
            'wysiwyg_enabled' => true,
            'option' => array('values' => array("")),
            'group' => $groupName,
            'apply_to' => 'brand',
            'default' => '<p><span><strong>History:</strong></span></p>
                            <li><span>Built in: 1992.</span></li> 
                            <li><span>Can survive in the cold winter night.</span></li> 

currently, when I create a new product, I can see the default value. The problem is i have a different store view that has a different language, and when i changed the store view when i create the product I need to have a different default value, how can I achieve this?


Your Answer

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