Questions tagged [attributes]

Magento Entity Attributes

This tag denotes questions regarding the EAV entities of Magento.
Products, categories, customers and customer addresses.

Magento 2 uses attributes to manage the information associated with products. An attribute is a property of a product, for example, the product color, the size, or the description. Some attributes are built into the system by default, and others can be created to address specific needs. You can add, edit, or remove product attributes in Magento 2 to customize your products

2246 questions
27
votes
3 answers

How to Get A List Of All Attributes

How can I fetch a list (array) of all defined product attributes? (basically I need the code and label). edit: The attributes I need this to dynamically generate ACLs for all product attributes that exist in the shop. (working on a module for Hide…
Alex
  • 13,817
  • 19
  • 82
  • 163
6
votes
2 answers

Programmatically remove attribute from attribute-set

I've tried removing an eav_entity_attribute using this code: $entAttr = Mage::getModel('eav/entity_attribute')->getCollection() ->addFieldToFilter('attribute_set_id',$set->getId()) …
jstrez77
  • 772
  • 1
  • 10
  • 24
5
votes
3 answers

How to set sort order while add attribute programmatically

I want to set sort order in attribute. In mysql file i m used this 'sort_order' => 10 but it not worked [Edit] $installer->addAttribute('customer','badge', array( 'label' => 'Badge', 'type' => 'text', …
ND17
  • 5,181
  • 9
  • 50
  • 78
4
votes
1 answer

Programmaticaly change attribute product type ( apply_to )

Scenario: I have created a new product type (configurable_b), that extends the configurable product type. The issue is that when I edit the product in the backend I cannot see many attributes. The reason are: Many attribute are assigned…
Fra
  • 6,965
  • 12
  • 65
  • 99
4
votes
1 answer

Magento Custom Category Attribute File

Is there anyway to upload .flv extension on magento custom category attribute? I have this certain file upload, and it's front-end input is file, Originally it's image, but I changed it to file, but it still doesn't work. It does not upload the…
Brian Coolidge
  • 205
  • 4
  • 13
3
votes
1 answer

Add custom field to Attribute page

Is there any clean way to add custom field to all product attributes in Magento? Catalog -> Attributes -> Manage Attributes -> (Add new/Edit) Attribute page. Something like it can be done for catalog category: $setup = new…
Vitaliy Povar
  • 61
  • 1
  • 5
3
votes
2 answers

Hide products with a zero price

Is there anyway i can hide a product that doesn't have a price or 0 for its price? We use stock import tools (Magmi Data Importer) and so some products imported don't have a price. How can i check each product has a price and disable it if it…
Marc
  • 33
  • 1
  • 3
3
votes
1 answer

How can I reconfigure (revert factory settings) for Links Purchased Separately field?

I was experimenting with attributes API in Magento and accidentally modified the attribute that I didn't want to modify and which seems to be important in for product form. It is links_purchased_separately. My version of Magento is 2.3.1 Now, when…
3
votes
1 answer

Attribute renderer is not working

I am trying to add what will become a slider into the administration area. I have an input box showing (that will eventually hold the slider value) by creating a new attribute in my install script: $installer->addAttribute( 'catalog_category', …
beingalex
  • 727
  • 2
  • 11
  • 25
3
votes
4 answers

get Attribute default store view label list

I'm looking for a function that get all labels of a specific attribute. However the label that I get is the admin view. I would like to show the default store view instead. Here is my current wrong code : $attribute =…
axelparatre
  • 125
  • 4
  • 16
3
votes
1 answer

New customer address attributes not saving

I've created 2 new customer attributes. These attributes show in the admin under "Customers > Attributes > Manage Customer Address Attributes". I've overwritten the registration form (register.phtml) to display form fields matching these…
Ryre
  • 1,147
  • 1
  • 16
  • 32
2
votes
4 answers

Fatal error: Call to a member function getId() on a non-object in

I am trying to get custom attribute value in frontend I am trying below code in view.phtml , its working fine. when i used the same code in other .phtml file its giving error : Fatal error: Call to a member function getId() on a non-object in
Baby in Magento
  • 3,167
  • 16
  • 83
  • 221
2
votes
1 answer

Add an attribute to product where NAME contains "something"

I nedd to add a specific attribute to products where product name contains "sometingh". Example: Product Name: "shoes ARMANI leather patent" Attribute Designer: empty I would add ARMANI to attribue DESIGNER for all products that have on NAME the…
monak83
  • 51
  • 3
2
votes
1 answer

How to identify and delete stray attributes

I'm trying to figure out how to identify stray attributes that do not belong to an attribute set. We've got so many duplicate attributes, and we're having a hard time figuring out what is actually being used. Also I heard that having lots of…
Regina Nickles
  • 301
  • 2
  • 8
2
votes
0 answers

Request Timeout whist I was creating an attribute set based on default

Please help I got this error whilst i was creating an attribute set based on default. Please see attached of what i was trying to do and also the error page.
1
2 3 4 5 6