Questions tagged [product-attribute]

Questions about creating, managing and using product attributes

Filter by
Sorted by
Tagged with
1
vote
2answers
52 views

Magento 2 : Validate a condition rules based on product attribute

How to validate a condition rules based on product attribute in magento 2 backend: code: $product_id = '3'; // Crown Summit Backpack sku is 24-MB03 $objectManager = \Magento\Framework\...
1
vote
0answers
17 views

M2 - Lots of product attributes and sets

We have a new webshop with photo camera's and all the accessories. We have 25+ attribute sets and the attributes sets have specific attributes (30+). For example, a camera has the attribute set "...
2
votes
0answers
31 views

Add Attribute Bulk Value Using CSV File in Magento 2.3.3?

I have Magento 2.3.3 Store And I have too many Product Dropdown Attribute And One Attribute have a something 500 1000 value. So How can I add multiple values using CSV file or other options so, ...
0
votes
1answer
15 views

How to sort the options of the dropdown attribute in magento 2

I am using the following code to get the options of the select attribute. Now I want to get the options that should be ordered alphabetically. file.php $eavConfig = $object_Manager->get('\...
1
vote
1answer
25 views

How to add SKU in the attribute list in the More Information tab of the product view page?

I have added the following code to catalog_product_view.xml to show the SKU in the list of attributes inside the "More information" tab <referenceBlock name="product.info.details"> <...
0
votes
0answers
10 views

Date Attribute not saving for Products in Magento 2

I have created a product attribute in Magento 2, but its value is not saving while saving. I have created a date attribute in Magento backend. But it is not saving, Can anyone guide me
1
vote
1answer
47 views

Magento 2 How to modify query for list of parent products which have no attribute but child have that attributes?

I am working on to get all the products that have attributes match. My current code is $categoryProducts1 = $objectManager->create('Magento\Catalog\Model\ResourceModel\Product\Collection'); $...
0
votes
0answers
24 views

Product Attribute filter is not working in magento 2.3

https://morgap.com/computer-hardware/processors.html In the above link apart from price filter, other attribute filters not giving the exact result set. for example if i am selecting coreI5 it is ...
1
vote
1answer
30 views

How to add a custom attribute to a product view in Magento 2?

I created the attribute with code "supplier" in my admin area, besides, I saved the file "mycustomblock.phtml" in "/app/design/frontend/{MyThemeName}/default/etc/Magento_Catalog/templates/product/...
2
votes
2answers
122 views

Magento 2: How to setup layerd navigation in custom product collection?

I am trying to set a layered navigation filter on the custom cms page. for that, I have created a 1 cms page name test with two-column with left bar. and inside it, I have called one template file {...
1
vote
1answer
52 views

Sort the product collection before load by attribute option in Magento2

I am trying to sort the Product collection based on the attribute option value, I used below plugin Vendor/Module/di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/...
1
vote
0answers
15 views

Create a Programmatic attribute that detects product if it is Still On Sale or New

Scenario wanted: Lets say you have multiple products that is on sale till a specific date each product with its own time and you want to create a promotion condition rule for all these products under ...
1
vote
0answers
23 views

Magento 2.3.3: Widget layout - Is it possible to add a widget to products by attribute?

I know Magento allows for widgets to be placed on specific products but I need to take it further. I need the option to allow me to filter by product attribute and apply widget to products with those ...
0
votes
0answers
23 views

Magento2 Landing page with custom attribute

I want to create a landing page with custom attribute brand Need to show just all brands who are my attribute value. Also need pagination and sort by newest.
2
votes
1answer
55 views

How do I pass the product ID and attribute to Gallery.php block?

How do I get product ID and product attribute at magento/module-catalog/block/product/view/gallery.php? Please help, I need to do some image filtering by product custom attribute with the image ...
0
votes
0answers
39 views

Magento2 how to display product attribute in admin edit form with multiselect? [duplicate]

I have created one custom module and in the admin edit form, I want to show product attributes with multi-select in the edit form. The product attribute size has multiple values. There is one ...
0
votes
0answers
16 views

How to override Save.php on create new attribute or update new attribute also after save/update I need to run afterSave() function but not working?

I am creating one module to add one extra field in the product attribute. So I added one tab and add one field as "Name". So, I need to override Save.php So my code is <?php namespace Vendor\...
1
vote
1answer
27 views

How to make product specific multiselect attributes on Magento 2.3?

We have a table that has data linked to products. MyCustomDataTable { id, product_id, text_value } We want to be able to search for products using the MyCustomDataTable.text_value value. ...
1
vote
1answer
108 views

How to add new tab after storefront properties in product attribute Magento 2?

I want to create a new tab and some options in the product attribute. So, how can I add that tab with options, please give me some ideas or any reference? Thanks
0
votes
1answer
22 views

magento2 show text swatch as dropdown in product listing age

I want to show dropdown attribute on product listing page but Magento is not providing that functionality so I have created attribute as text swatch now I want to show that attribute as a dropdown on ...
0
votes
0answers
10 views

Magento 2.3.1 :: Orphaned attribute records

Recently we had an issue with the number of files found in the pub/media/product/cache folder causing us to run out of inodes. In our investigation, we found a lot of duplicate images in the folder. ...
1
vote
0answers
54 views

Sort search result products by attribute option value in Magento 2

I want to sort the search result collection by product attribute option value. Scenario: I have created a custom attribute called "product_category" as a drop down attribute. Which has the ...
0
votes
1answer
28 views

Magento2; how to call attributes for upsell products product/list/items.phtml

I need to call some product attributes in the Upsell Products view for Magento 2. This would be in the Magento_Catalog/templates/product/list/items.phtml This is said case; case 'upsell': /** @...
1
vote
0answers
17 views

Magento 2 visual swatch not showing in frontend

I created different attributes with visual swatches, and assigned each one to differnt attribute sets. I have differnt products with different attribute sets, but for some reason visual swatches are ...
0
votes
0answers
14 views

Magento 2 display attribute dropdown on product page depending on attribute set

I have found tutorials like this http://excellencemagentoblog.com/blog/2018/03/13/displaying-custom-product-attribute-on-product-page/ on how to display a custom attribute in frontend product page, ...
0
votes
1answer
23 views

Create a attribute set and add an attribute to it

How to create an attribute set set of the set attribute inherited from default and add a simple attribute to it that will be in the 'Content' group of the product Use UpgradeData because magento 2.2....
1
vote
1answer
38 views

Getting product name + categories + other attributes from database directly?

Magento 1.7.0.2 I got the attribute ids I want to get from the database, they are 426, 74, 439, 92, 81, 425. In addition to those I want the product name, sku and the categories the product is in. ...
0
votes
0answers
14 views

Magento2.3 get product name using ProductCollection->GetData()

i'm working on Magento2.3 and i need to work with my product not as object but as array. So i use getData function and everything goes right. $array=$_productCollection->getData(); but GetData ...
1
vote
1answer
38 views

Magento 2: How to display the description and review without tabbing

How can i display the review and description without tabbing like the below image?
0
votes
2answers
39 views

Magento 2 - Get attribute label by id in controller

I am passing attribute id in my controller's URL and I am taking that id as below in my controller, $colorparam =$this->getRequest()->getParams('color'); This returns me the id present in the ...
0
votes
0answers
30 views

Magento 2 Do we need to reindex & cache clean for Product Qty update

I need to update product Qty programmatically, I have my main store where I have my stocks details so I need to update to Magento whenever it's triggered from my Main store or by cron with interval. ...
3
votes
3answers
127 views

How to get Attribute Text depending on storeId in magento2

I want to get attributeText of product depending on what storeId is passed.
0
votes
0answers
5 views

Add some product attributes under order transnational email sending to admin

In my store we are sending an email copy to admin along with customer. While customer placing an order. We are using separate email template for admin. In that we need to add one custom attribute in ...
3
votes
0answers
29 views

magento 2: create custom frontend input type

I need a custom frontend input type which I would call "table": The issue at hand is that I have a customer that has a lot of different attribute sets with even more attributes. And he is in a ...
0
votes
2answers
53 views

Class + does not exist

I have this strange error when i try to edit a product or update attributes I am unable to find anyone else who has had this non specific error appreciate any help as work flow is frozen Full error ...
0
votes
0answers
15 views

Update multiselect product attribute for multiple products by adding value to existing value selection

I have a product attribute with multi select with many options. Users wish to use the mass/bulk update on the product grid to add a new option to a set of existing products. However when this is ...
0
votes
0answers
16 views

magento 2 sort using ORDER BY FIELD

Case : i have create attribute name : Populairty attribute details as below , i have set Used for Sorting in Product Listing as yes , value of it can be as 1: yes 2: no 3: very popular i want to ...
0
votes
0answers
21 views

Get visibility of product in product list

Within a product list, I would like to access $product->getVisibility() for each product of the collection. However, this is always null instead of either of the 4 states. I have already added &...
0
votes
0answers
12 views

Do I need to loop all children of the configurable product to know the stock of each product size?

In a shoe store I have the following configuration: For each color we have a configurable product, and in this configurable product we have size variations. We have a size filter ... when a customer ...
1
vote
1answer
26 views

How to add Unit Text in an input field?

I want to Programmatically create Custom Product Attributes in Magento 2.3.3 and I want a Unit/Quantifier in this input field as well like lbs in this example. Its code is <label class="...
0
votes
1answer
27 views

How to add custom class in Product Attribute?

I am trying to add a custom class for some validations and styling purposes in a Programatically created Product Attributes, I have tried frontend_class and class property but it didn't work. Can ...
1
vote
0answers
22 views

Is it possible to use default Magento colorPicker in 'Update Attributes' action?

I am trying to use default Color Picker component of Magento. If I edit products individually the color picker works perfectly. Once I try the update attributes action from Catalog->Products page ...
0
votes
3answers
163 views

Magento 2 sort by Attribute value

I have multi-select attribute name location like : Delhi , Maharashtra, Karnataka. I want to use sort by of filter by in such way when I use above filter / sort it should show all products but ...
0
votes
0answers
14 views

Category not being updates for products

I currently have a cronjob plugin running in the background of my magento 2 installation which imports products from an XML file to the db. The code checks if the product exists, and if it does it ...
0
votes
1answer
29 views

size attribute showing limited items but category products have more than that in magento 2

Size attribute showing limited items in filter navigation but category products have more than that in Magento 2. Please see the following images for more details. Anyone know how to solve it ? ...
0
votes
0answers
31 views

What is the use of Communication.xml in Magento 2 Catalog module

What is the use of following vendor\magento\module-catalog\etc\communication.xml file located in the catalog module in Magento 2? <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
0
votes
0answers
18 views

Get product configurable attribute with value (Child of configurable) from QuoteFactory

How can I retrieve simple product configurable attribute with its value from \Magento\Quote\Model\QuoteFactory (or any other method?)? I can retrieve some information using this: public ...
0
votes
1answer
42 views

Magento2: Default value is not working of Date type product attribute?

I have created product attribute from admin and set input type "Date" and assigned "default date value" but default value is not showing when adding product and frontend also. Please check below ...
0
votes
4answers
85 views

How to filter product by specific attribute in Magento 2?

I want to filter a collection of products by product (brand) attribute, thanks
0
votes
0answers
30 views

Magento 2.3.2 - Update product attribute option api duplicate option value

I'm trying to add and update product attribute options through the api endpoint: /V1/products/attributes/:attributeCode/options. When I try to update the values of an existing attribute option, the ...