Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [attributes]

Magento Entity Attributes

0
votes
1answer
1k views

How to set a default value for a attribute to all products

I have create an attribute "Brand Name" from Catalog > Attribute > Manage Attribute. I have only one brand name so i want to set that name in "Brand Name" attribute for all the products. How ...
0
votes
1answer
918 views

Changing advanced search results query - Magento 2

I've extended the default layered navigation in magento 2 so that filter parameters are added like so: ?free_from=304_303_302 Where option ids are separated by an underscore, in the above example ...
1
vote
3answers
4k views

Magento 2: Display Custom attribute value under the product name on category page

I want to display custom attribute value under the product name on category page. Attribute type is dropdown and attribute name is Brand. I want to display the brand name under the product name on ...
0
votes
0answers
15 views

Filter Products in list page based on attribute in magento2

I have a requirement like below. Right above the category page i have loaded custom template file with the drop down html. with options like below. ---select class --- test 1 test 2 test 3 ...
1
vote
1answer
37 views

magento 2 get configruble attribute [duplicate]

how I can get all attributes that used for creating a configurable product? did we have API for this? and how we can create configurable attribute by admin panel
0
votes
0answers
10 views

How to sort the product attribute options list in magento 2.3 alphabetically?

I am trying to sort the product attribute options list alphabetically. I have no idea how to do it for drag & drop fields. I want to sort attribute color, size, and brand.
0
votes
0answers
6 views

Magento 1. Copy all product attribute Labels and Options from storeview 1 to storeview 2

So we have created a new store. Only to see that wee have to manually OPEN and COPY all product attributes Labels and Options 1 by 1. Storeview X already has the correct Labels and Options. ...
0
votes
1answer
993 views

Magento2: product page returns error

With no apparent reason, product pages do not show for me anymore. Error text: Warning: Illegal offset type in isset or empty in /path/to/project/vendor/magento/module-eav/Model/Entity/Attribute/...
0
votes
1answer
939 views

Show Admin value of an attribute in Magento 2

In Magento 1.x I could show the Admin value of an Attribute like this: _product->getAdminAttributeText('bleach') But it doesn't work in Magento 2. How can I show the Admin value of a dropdown ...
0
votes
0answers
11 views

Magento 1.9.4.1, saving product attributes values lost/messed up

I have a catalog drop-down attribute, within that attribute there are about 70 options defined. Every time after saving that specific attribute, one of the options loses its display-value for each ...
0
votes
2answers
1k views

Magento2 How can get the Attributes based on the Attribute Set Id or Attribute Set Name

In Magento2, How can get the all (product) Attributes based on the Attribute Set Id or Attribute Set Name in the Custom Product List Page.
1
vote
0answers
12 views

How to allow duplicate admin name values for color attribute in magento 2.3

As per Magento 2.3, it won't allow adding duplicate values for product attributes. For the temporary purpose, I want to allow the duplicate value of Admin, under color attribute. How can I restrict ...
0
votes
0answers
26 views

How can I have a product attribute with a source model as a swatch?

I have a product attribute that I populate from my own custom table, I have a class that extends from \Magento\Eav\Model\Entity\Attribute\Source\AbstractSource to be able to populate my attribute ...
0
votes
2answers
46 views

Magento 2 addAttributeToFilter not working

In product collection addAttributeToFilter is not working if we assing attribute value in only store view. But if we assing in default and store view than it working fine. anyone have idea why it is ...
1
vote
0answers
19 views

Can't update products in Magento 1.9

When I try to update a product nothing happens and I got the following messages in logs: 2019-05-16T07:19:30+00:00 ERR (3): Warning: array_key_exists() expects parameter 2 to be array, null given in ...
2
votes
0answers
20 views

Create import entity for attributes

I'm trying to implement a new import entity to be made available through the ImportExport module (which is actually extended by Firegento_FastSimpleImport2, but that's not relevant for this question) ...
2
votes
3answers
608 views

how to show attribute value for sorting in products list in magento

I have a attribute color which have value , red, green, blue, white, black and i want to show all these color value in product list page for sorting just like name and position. Is there anyway to ...
0
votes
1answer
11 views

How to get product manufacturer swatch image?

I have next string, where I get manufacturer attribute: $brand = $currentProduct->getResource()->getAttribute('manufacturer'); I need to get attribute swatch image. How can I get it? On ...
2
votes
0answers
17 views

What is the scope of source model extend and implement?

What is the scope of source model extend and implement between these two? \Magento\Eav\Model\Entity\Attribute\Source\AbstractSource \Magento\Framework\Data\OptionSourceInterface Attribute options ...
1
vote
0answers
12 views

Product attribute value visible in Catalog table but its field is empty in Edit Product form

I have a strange issue with Magento 2.2.5 where two of my product attributes have its values showing in the Catalog Table, but when you click into the product itself to edit, the field for that ...
0
votes
0answers
10 views

divide existing configurable Products

Its a bit of a complicated Situation at a Clients Magento (1.9) Store. Products are generated programmatically by an Interface to a bigger Managementsystem for Goods. Most Products are Clothes with ...
0
votes
2answers
1k views

Magento 2: Custom validation on product attribute

There are only six validation available for product attributes validate-number (Decimal Number) validate-digits (Integer Number) validate-email (Email) validate-url (URL) validate-alpha (...
0
votes
0answers
16 views

How to filter a customer boolean attribute on the admin invoice grid(Magento 1.9)?

I can successfully display a Yes or No for my customer boolean attribute on the admin invoice grid using the following code. Here's the collection setup: $entityType = 'customer'; $attributeCode = '...
0
votes
0answers
11 views

Magento 1. Set customer attribute based on (max) order attribute values

we want to store some meta/customer attributes dynamically based on order data. Per customer we would like to store the brand attribute that was sold most and store the size attribute that was sold ...
0
votes
1answer
19 views

Magento does not use specified default value on attributes of type yes/no

I added a new attribute with Default Value set to Yes. I added the attribute to my attribute set and edited the product, but it is set to No by default. How can I fix it?
1
vote
0answers
23 views

How to modify the collection of options in step 2 when creating product configurations magento 2

I have overrided this template module-config product/view/admin/templates/catalog/product/edit/attribute/steps/attributes_values.phtml now i can't understand where options com from in the file and ...
3
votes
1answer
96 views

More than one Free shipping issue with Shopping Cart Pricing Rule If General Free Shipping Enabled?

I have applied free shipping for purchase over 1000, If i try for free shipping specific products which is below 1000 using Shopping Cart Price Rule Free shipping not applying, Note : Created ...
0
votes
0answers
16 views

How to display options of custom attribute product magento 2?

I have created a custom attribute for product and I can add options dynamically as well. But the problem now I'm facing is that I want to display just the option relative to the current product, so ...
2
votes
0answers
12 views

How to have irregular price filter ranges?

If I configure manual price ranges, I can define the step, but that step is a constant for all ranges. Is there a way to have, for example, USD 1 to USD 199 USD 200 to USD 499 USD 500 to USD 5,000 ...
0
votes
0answers
18 views

left side Attribute filter with checkboxes , Magento2.2.6

I am using Magento2.2.6 Our requirement is attribute filter with checkbox display on left side layer navigation inside.Not page reload Ajax using filtering.If anyone idea and if this functionality ...
1
vote
1answer
8 views

GetLocalizedLabel not working under Grouped Products

I'm trying to extract 3 attributes for every associated product under a grouped product page. I use a multistore Italian-English but if I use $stato_label= $_item->getResource()->...
0
votes
1answer
17 views

Get custom attribute in CatalogInventory module

So far I have created custom attribute my_custom_attribute and I want to pass this attribute inside Magento/CatalogInventory/Model/StockStateProvider.php and call it like $stockItem->getIsInStock() ...
2
votes
0answers
6 views

How to add svg icons to Swatch attribute (disable admin panel file validation)?

Currently, I can load png/jpg files in swatch attribute, but when I tried to load save attribute with loaded svg file, it's not working. When I load svg from servers - it displays well, but when I ...
0
votes
2answers
585 views

Product Attribute - Multiple Select Not Saving

Hi I have products with a fair few custom attributes which are all working fine. I have two Multiple selects however that do not save what I enter in them! All other text fields, dropdowns etc all ...
0
votes
0answers
5 views

can't create a config product according to my new custom attribute with dynamic options magento 2

I had created an attribute that have the type select and with dynamic options. the idea is that after creating a product this attribute will have or not options according to the sku of product. I want ...
2
votes
2answers
2k views

Magento 2 - Get custom attribute within .phtml file using Magento\Catalog\Block\Navigation class?

I am trying to get a custom attribute value within my phtml file but struggling to get this to work? getData() & getCustomAttribute() doesn't seem to work. I believe this is because I am using the ...
2
votes
1answer
558 views

Super product attributes same price for attribute

This is a bit hard to explain. But in Super product attributes configuration there is a field where you can set a cost that is added to the product. I want to be able to have this price sett as a ...
3
votes
2answers
975 views

Custom Attribute in Layered Navigation

I have a custom attribute called m2_price, which is the Metre Squared price of a piece of carpet. I've enabled it to be filterable with results in the layered navigation and this all works fine. ...
0
votes
1answer
20 views

Magento 2.3 - what's in the Default attribute set? (migration wiped it)

I have used the Data Migration Tool and now am cleaning my migrated attribute sets, wanting to remove attributes that dont make sense. My attribute sets have many groups called Migrated_ and a few ...
0
votes
0answers
10 views

How to import Text Swatch attribute Using Magmi?

How i can import text swatch attribute in Magento using Magmi? In my CSV file i will put the attribute code but the description is filled only like below:
1
vote
1answer
24 views

Manage hundreds of product attributes in a simple way

For the type of products that I manage in my eCommerce I should create about 300 product attributes to create a complete technical sheet. Is there a way to create feature in a product page tab, like: "...
1
vote
4answers
3k views

Magento 2: How to set visibility and status to product using collection?

I'm creating a cron to pass through all the products and set them visible and active. This is my execute of the cron who runs well: public function execute(){ /** * @var $item \Magento\...
4
votes
1answer
3k views

Color swatch and text swatch issue in magento 2

If I used color and text swatch in magento 2, sequence/order of option isn't changing. I mean I want to show 1. size 2. color but it always show 1. color 2. size if I used dropdown instead of ...
0
votes
1answer
12 views

How can I create a new STATIC Product attribute in Magento 2?

How can I create a new STATIC Product attribute in Magento 2? We use barcode as a unique identifier (same as SKU) and are considering adding this - same as sku - as a STATIC attribute directly to ...
2
votes
1answer
645 views

How to add multi-select category tree at admin end in magento 2?

I would like to display *Category Tree Names** in multi select field in magento 2 admin end? I have tried with below code but displaying only first cateogires could you please any one help on this? ...
2
votes
2answers
48 views

Magento 2: How to enable html tags in backend attributes?

I have added payment method in magento2.2. The payment method has an input box typed textarea. I want to add a href link but it's not supporting it. Is there a way to enable HTML tags. I am getting ...
2
votes
0answers
50 views

Magento 2.1.5 products filter problem

I'm currently working on setting up a e-commerce website. Of course we want to use a filter for the products but I'm facing a problem at the moment. I have a category with 5 products. All of them are ...
0
votes
1answer
65 views

Replace string of number / remove numbers

I have create an attribute and it shows the stock on our two stores. It is made through an integration from our Navision. My output is 2.0000 etc. I would like to make an replace on the stock ...
1
vote
0answers
25 views

Magento 2 add a field to front account information tab

I'm trying to add a custom text field to the edit account information page on frontend customer dashboard, so i tried to create a module like this in VendorName\ModuleName\Setup\InstallData.php ...