Questions tagged [product-attribute]

Questions about creating, managing and using product attributes

Filter by
Sorted by
Tagged with
0 votes
1 answer
11 views

Cannot Update EAV Unique Attribute

I have a custom product attribute custom_attr that I created using InstallData.php and set its unique value to true. Now, I am trying to set it back to false in UpgradeData.php but the changes are not ...
user avatar
0 votes
1 answer
17 views

Creating configurable product attribute with magento > 2.4

I wrote an extension to import products from an XML-file. It is working (for now), but I am using a ->save() method on the Class Magento\ConfigurableProduct\Model\Product\Type\Configurable\...
user avatar
  • 383
0 votes
1 answer
38 views

Show a Text if attribute is set to "yes"

I want to display "it working" on default.phtml if the product is assigned to attribute [Franke] with "yes". Please help. I have tried the below code, but it doesn't work ...
user avatar
0 votes
2 answers
36 views

exclude some other product in the cart from receiving discount

How to get product value ( product price) if attribute "logitech" is set to yes [attribute is Boolean]. I'm new here, still learning magneto. below code, calculate all items in the cart but ...
user avatar
0 votes
0 answers
9 views

How to preview Selected Out Of Stock Products on product level using attribute?

We have an attribute name replenishable and want to assign only on specific Out Of Stock Products to show on Cateogry Pages.
user avatar
0 votes
0 answers
21 views

How to add new column in product attribute options

I want to add custom column for attribute options in Magento 2, like this: How can i do?
user avatar
0 votes
1 answer
20 views

How to hide my custome shipment method based on custom product attributes in Magento2?

I'm a very new to Magento2. I'm stuck with display the new shipment option show/hide. I have created a new shipment method programmatically and name it "Same Day Delivery" and also I have ...
user avatar
0 votes
1 answer
49 views

Display product attributes in cms block or page builder

I need to be able to reference product attributes inside a cms block or page builder, I am not wanting to create any template files I am wanting to call it like you can call a variable. So here is one ...
user avatar
  • 1
0 votes
0 answers
40 views

Magento 2 : How to add product attribute as color picker in product form?

I'm trying to add color picker attribute in product form I have referred this link:- https://kiwicommerce.co.uk/blog/how-to-add-a-color-picker-in-product-edit-form-in-magento-2/?unapproved=1745&...
user avatar
  • 1,838
0 votes
0 answers
10 views

Create a product attribute type of datetime

I seem to be going around in circles trying to create a datetime product attribute that shows a date picker with the time input on a product attribute in the admin. If I set the eav_attribute ...
user avatar
0 votes
0 answers
9 views

Product attribute group inside product attribute group

Create a product group and create an attribute into that specific group...it's quite easy in magento. Ex : public function createAttributeGroup($groupName,$order = 1) { $attributeSetId = $this->...
user avatar
  • 772
0 votes
0 answers
24 views

How to get child products from Layer Class Magento 2

14219 is the ID of the parent product. 14217, 14218 are the child product ids, I need to get from the Layer which products visibility is VISIBILITY_NOT_VISIBLE , can anyone help? Thanks class Layer ...
user avatar
  • 728
0 votes
0 answers
51 views

How to Filter Product Collection by Child product attribute in magento 2

I have size attribute assigned to child products, now I need to filter product collection by child attribute(size).
user avatar
0 votes
1 answer
22 views

General system exception happened - The custom_range value wasn't found in the algorithms

When importing a csv spreadsheet I am getting the following error:
user avatar
0 votes
1 answer
25 views

Add product status in tile view

I want to add product status to show in Tile View.(inside category) I can see that in grid view but not in Tile view. Anyone can advise me where I should modify?
user avatar
  • 518
0 votes
1 answer
43 views

Magento 2: custom product attribute add datepicker with time

I am trying to add a datetime custom product attribute but it is showing date only I want to show time as well: Here is my install script: <?php namespace Custom\ProductScheduler\Setup; use ...
user avatar
0 votes
0 answers
27 views

Magento 2 Merge Configurable Attributes

there are currently three distinct "size" attributes for configuring product variants on the website: size_international size_clothing size_foot Considering it a wrong approach I intend to ...
user avatar
  • 1,198
0 votes
0 answers
12 views

Custom attribute image magento 2

I am trying to create a method to upload a custom image to the product. I have used the following code: $this->moduleDataSetup->getConnection()->startSetup(); /** @var EavSetup $...
user avatar
1 vote
0 answers
36 views

How to add category filter with OR condition in product collection?

I'm using magento v2.4.1 and i have a custom attribute name landmark, and i want to filter a product collection using landmark attribute and category id using OR condition. Currently i'm doing it like ...
user avatar
  • 177
0 votes
1 answer
90 views

Create a new price attribute for the product

I want to add a price attribute for my product. So I can add this to my product as a decimal attribute but...I don't know how to give him the options in order that this attribute comes out with the ...
user avatar
  • 772
0 votes
1 answer
18 views

Update attribute : add source

I have a product attribute that have been added directly in the database threw a migration process. I want to update that attribute to give him a source. But this seems not to be working. $attribute = ...
user avatar
  • 772
1 vote
1 answer
135 views

How to get product collection along with is saleable attribute in Magento 2?

I'm using magento v2.4.1 and I'm extending \Magento\Catalog\Block\Product\ListProduct in my custom module block to load a custom product collection like this: protected function _getProductCollection()...
user avatar
  • 177
0 votes
2 answers
42 views

How to delete all custom product attributes

How can delete all custom product attributes from database and keep only system attributes in Magento 2.4
user avatar
0 votes
2 answers
42 views

Can't get ID of newly created attribute

I am creating an importer which will add products from an API to our Magento site. Part of the requirements is to programatically create an attribute if it does not yet exist on the Magento side. ...
user avatar
0 votes
2 answers
87 views

Sort order products in categories by custom value attribute first in Magento 2

I want to sort products with custom value (1) numeric attribute. In toolbar.php: if ($this->getCurrentOrder()) { $this->_collection->addAttributeToSort( $this->getCurrentOrder()...
user avatar
1 vote
1 answer
61 views

Magento 2.3: Get list of unused product attributes

I want to get a list of all unused product attributes through database or code. Any help would be appreciated.
user avatar
0 votes
1 answer
89 views

how to create or update product attribute value for specific categories? Magento 2

I created an numeric attribute, and product has assigned 2 categories (parent category and subcategory), is it possible update product attribute only for subcategory? or is it possible create custom ...
user avatar
0 votes
0 answers
30 views

Magento 2 add product id to configurable product dropdown option values

I have overridden this below file vendor/magento/module-configurable-product/view/frontend/templates/product/view/type/options/configurable.phtml I'm trying to add an appropriate simple product id to ...
user avatar
  • 828
0 votes
1 answer
21 views

how to check the custom product attribure has the particular value using loop In magento 2.4.2?

In magento 2.4.2, I have custom attribute and it has some value assigned. how to load the product by custom attribute and how to check the custom product attribure has the particular value in for loop ...
user avatar
  • 1,094
1 vote
0 answers
32 views

Magento 2.3.4: Add new column to Manage Options of Product Attribute

Like the title, I'm trying add new column to Manage Options. The problem is that the style of the row I want to add is select. It is showing but when I click on the select box, the list of options is ...
user avatar
0 votes
0 answers
23 views

How to create a product with multiple variables for set a prices

I am struggling trying to create a product in magento with diferent prices We will sell travel package but the price have to change in this 3 cases. Season (more expensive in hight season) 3 ...
user avatar
  • 1
0 votes
1 answer
36 views

Uploading Product Brand CSV in magento2

We have 67 products where we have just uploaded but the "Product Brand" has not been selected. I have tried the following: A singular coloumn with title "product_brand": Rudy ...
user avatar
0 votes
0 answers
34 views

Magento 2 copy SKU value to custom attribute value

I have approx 50000 product in my store. I would like to copy the SKU value to the Custom attribute(custom_sku_field) value for all products. I think going for SQL query might be risky. so can anyone ...
user avatar
  • 5,856
1 vote
0 answers
80 views

How to prevent deadlock when updating product attribute?

I have built a seperate module for my ERP and custom import from excel file to update product attribute. These two modules using this Magento function to update product attribute: /* Magento\Catalog\...
user avatar
  • 177
1 vote
1 answer
38 views

Magento 2.3: How to add new product attribute options programmatically on Controller save?

Is there a way to add new options, programmatically, for a product attribute with attribute code 'brand' that is already created from admin? I want to add new options on Controller Save action. The ...
user avatar
0 votes
0 answers
23 views

Migrate Products from 1 to another magento site

I have approx 3200 products which needs to be migrated from one magento website to another. All products are having hundreds of attributes and brands which also needs to be migrated. Moreover both the ...
user avatar
  • 1
0 votes
0 answers
17 views

Magento 2.4.2: How to delete an attribute?

How can an attribute added to Backlit Mirrors attribute set be deleted? None of the answers here in the stackexchange does help.
user avatar
0 votes
0 answers
13 views

HMRC Commodity Codes M2 how/Where

Hi Looking to get the most out of M2 and as usual, Ive looked but cant see the answer. Where do I enter HMRC Commodity codes in M2, I'm currently adding them in the Royal Mail Inventory Systems ...
user avatar
0 votes
1 answer
52 views

Update color visual swatch attribute images Magento 2.4

we need to update only images from existing color attribute options. How to achieve this?
user avatar
  • 5,800
0 votes
1 answer
17 views

Strange interaction between module and attribute sets

I faced an unusual problem on one of the live sites. The gift card module adds its "Gift Card by Amasty" option in the "Add product" menu and when the module behaves normally, it ...
user avatar
0 votes
1 answer
132 views

Magento 2: Get product sku by product attribute values

I have custom product attributes color_type, color, and size. I want to get product SKU by using values of these attributes. Any help would be appreciated.
user avatar
0 votes
1 answer
473 views

Magento 2 How to add the custom categories attribute field in product form? [duplicate]

I am trying to add the categories and subcategories in a small panel Exactly like the one in the Product Form in the admin panel. I need to add it in Product Form How to achieve this?
user avatar
  • 5,800
0 votes
1 answer
38 views

How to delete empty attribute values in Magento 2

We have an attribute for some of our products that has hundreds of empty values. If you try to make and save any changes to any values, it kicks you back out to the dashboard and the changes are not ...
user avatar
  • 1
0 votes
0 answers
27 views

Renaming product images once uploaded

I am not a developer! Can we rename uploaded product and category images, or do you have to name them before uploading?
user avatar
0 votes
1 answer
121 views

How to use custom product attribute in sorting option with search criteria builder for magento 2?

I have created one custom product attribute(bestseller). Now I want to sort by custom product attribute(bestseller) using search criteria builder sort by option but it's not working for custom product ...
user avatar
0 votes
1 answer
51 views

How to remove custom attribute value from magento 2 using setup script?

In Magento 2.x, If I have created a custom attribute and then need to remove that attribute and also need to remove that attribute value that is assigned to that entity. How can I do programmatically (...
user avatar
0 votes
0 answers
63 views

Magento2 pass Comma separated value in attribute options while importing products in CSV

Magento2 How to pass 2.6GHz 6-core 9th-generation Intel Core i7 processor, 512GB as a single option while importing CSV Getting following error Column configurable_variations: Invalid option value ...
user avatar
  • 3,446
0 votes
1 answer
81 views

How to retrieve value of multi-select custom product attribute?

I created a new drop-down custom product attribute and placed it in an attribute set. and I'm trying to retrieve its value programmatically in Magento 2. The name of said attribute is "...
user avatar
  • 71
0 votes
1 answer
39 views

Show/Display product attribute in description

Is there any way to pull or display a product attribute within the product's description?? What we're looking for is something the listings team can use to make a generic product description for lots ...
user avatar
  • 75
0 votes
3 answers
362 views

Magento 2: Get product custom attribute value in custom js

Hi is it possible to get product custom attribute value in JS? I am getting the product id in JS but I am not able to get the product custom attribute value. Any help would be appreciated. Thank you
user avatar

1
2 3 4 5
37