Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [product-attribute]

Questions about creating, managing and using product attributes

Filter by
Sorted by
Tagged with
0 votes
0 answers
11 views

(Magento 2.4) Add custom filtering to product attribute in graphql

I'd like to add a filter in the graphQl product query like this products( pageSize: 5 currentPage: 1 filter: { status: { eq: "1" } ...
Erasmo's user avatar
  • 1
0 votes
0 answers
24 views

Magento 2 : Programmatically Assigning images to product taking too much time

I have around ~10k of products to create programmatically. I also have around 20 custom attributes to each product. Saving the stock, the price, special price, those 20 custom attributes it takes ...
Attila Naghi's user avatar
  • 4,023
0 votes
1 answer
29 views

Adding custom product attribute to summary in checkout?

Magento 2.4.6 I added a custom product attribute next to the qty in the checkout summary following the tutorial on Add custom product attribute to checkout summary Magento 2. That works until the ...
user4095519's user avatar
0 votes
1 answer
28 views

Reading product attribute value for "All Store Views"?

Magento 2.4.6 Is there a way to read the value of a custom text field attribute value stored in the "All Store Views" scope? Currently I am using $product->getMyAttribute(); which returns ...
user4095519's user avatar
0 votes
1 answer
40 views

Display multiple select product attributes just like category attribute

I'd like to display some multiple select custom product attributes, in a more advanced way, just like category_id field does. (Using checkboxes, displaying selected values like tags with X option on ...
zekia's user avatar
  • 650
0 votes
0 answers
9 views

Updating label for product attribute option on 1 storeview only

How can I update storeview label without removing label on the rest of the storeviews? The code works fine for updating just 1 storeview, but it removes all other labels. Updating store 2, removes ...
AP87's user avatar
  • 197
0 votes
0 answers
13 views

How to apply custom price for bundle products in Magento?

I want to apply a custom price for the bundle product entered by the admin panel.
kanishka maduranga's user avatar
0 votes
0 answers
8 views

Update Custom Attribute like Price with the subtotal in the minicart

I have created an attribute for the Product like some extra fees. I got the attribute on the mini cart, saved it in the quote also updated their price according to the product quantity. I want to ...
Rana Zain's user avatar
  • 658
0 votes
0 answers
20 views

show custom price related attribute show on the MiniCart and the checkout

This is my Product attribute <?php namespace Vendor\Module\Setup\Patch\Data; use Magento\Catalog\Model\Product; use Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface; use Magento\Eav\...
Rana Zain's user avatar
  • 658
0 votes
1 answer
41 views

Magento 2.4 how to add custom attribute in sidebar

Magento 2.4 how to add custom attribute in sidebar I have created some attributes for my products and I want to display them in the sidebar I looked and tested most of the posts on the site, ...
P00ZHAN .'s user avatar
0 votes
0 answers
12 views

Undefined index on product listing modifier

I created a product custom attribute $eavSetup->addAttribute( Product::ENTITY, 'is_subscription_product', [ 'is_visible_in_grid' => true, '...
Claims's user avatar
  • 1,209
0 votes
0 answers
28 views

Add product attribute data to cart data

I'm working on displaying two specific options, compound_id and medication_id, in the checkout data within Magento. At present, I've managed to display mif in the cart data, but that's outside the ...
Demasys's user avatar
  • 11
0 votes
0 answers
15 views

Magento 2 Add custom test into Order Confirmation Email

In our requirement we've simple & grouped product, we need to add a product custom attribute in order confirmation email. I've followed https://community.magento.com/t5/Magento-2-x-Programming/...
senthil's user avatar
  • 1,729
0 votes
0 answers
16 views

filtering by multiselect attribute displaying values in static block

When filtering by text attribute type the module block and phtml template retrieve values by attribute code, however its not not returning values on MultiSelect ive tried the following: // Build a ...
Chris's user avatar
  • 1
0 votes
3 answers
57 views

Programmatically added attribute, default value enabled

My patch adds new attribute to products. I want it to be enabled on every product by default. However, it is always disabled on sample data products and works as intended when I try to add a ...
Dramorian's user avatar
0 votes
1 answer
39 views

unable to update custom attributes to product using rest API

I have created the custom attribute through rest API and it is also reflected in magento admin, after which when I tried to update the product with the attribute code.it won't worked. Below is my ...
manikandan.p's user avatar
0 votes
1 answer
32 views

Update custom attributes to product using rest

$data = [ "product" => [ "sku"=> $productsku, // "attribute_set_id"=> 4, //"attribute_set_id" => $mage_attr_set_id, ...
manikandan.p's user avatar
0 votes
0 answers
63 views

How to add a new field on Manage Swatch in Magento2.4.6

I want to add a new Multi-select checkbox field in Magento Swatch attribute.
SURENDER SINGH's user avatar
0 votes
1 answer
51 views

Magento 2.4.6: Order confirmation email configurable product custom attribute returns parent value instead of child

I'm trying to add a custom product attribute 'renewal' to the order confirmation email. I have several configurable products and they are returning the parent product attribute value rather than the ...
Michael Meyer's user avatar
0 votes
0 answers
19 views

How to toggle custom tab visibility in product view with event observer based on custom attribute's value (custom layout handle)?

There is a custom tab "Ask Question" in a product that has a form (it has a logic for saving data to the database). My task is to create an event observer for the attribute that I have ...
Dramorian's user avatar
2 votes
1 answer
27 views

Issue with ERP API PUT Request: Unintended Update of `warranty_type`

On Magento 2.4.6: When our ERP executes an API request on the PUT method /all/V1/product/:sku with the following JSON content: { "product": { "custom_attributes": [ { ...
Kallard's user avatar
  • 21
1 vote
1 answer
91 views

Add a button inside the "Product Name" attribute of a product in my Magento AdminPanel

I would like to add a button to the 'Product Name' attribute within the product information tab, but I'm unsure of how to achieve this. Below is my product_form.xml: <?xml version="1.0" ...
Vicente Romão's user avatar
0 votes
0 answers
24 views

remove same product from two widget

In our magento 2 store. We have 3 sections Featured Products Trending Products Top Picks in this section the products are showing, but problem is product can have all these 3 attributes selected. i ...
Amiyo Ghosh's user avatar
0 votes
0 answers
93 views

Magento2 ElasticSearch product attribute weight based on value

If there is a way to set product attribute weight depending on it's value? F.e. we have 2 attributes to search: name(weight=10) and description(weight=1) So in search results we'll have first results ...
Alexey Uvarov's user avatar
0 votes
1 answer
55 views

disable a cash on delivery payment method on the checkout for specific products

I want to disable a cash on delivery payment method on the checkout for specific products I followed the code in this question Disable Payment Method at Checkout in Magento 2 Based on Product ...
Ibrahim's user avatar
  • 13
0 votes
0 answers
21 views

Product variant URL with attribute and value IDs: doesn't switch image to selected one

In magento 2 is possible to call a specific product variant just appending to the "normal" URL: #Attribute_ID=Value_ID I've read in various posts that this functionality should also involve ...
user113280's user avatar
0 votes
0 answers
60 views

How to fix Attribute model is not defined error

When we search from the search box on the top of the header of the website at that time displayed error like 1 exception(s): Exception #0 (Magento\Framework\Exception\LocalizedException): The ...
kiran's user avatar
  • 597
1 vote
1 answer
33 views

Use widget to add dynamic text inside the short description tab based on text attribut of product?

I'm looking to have dynamic text that changes based on the store view and the product for seo reason. Below i've used a simple exemple of a dynamic country name : 1 - On the attribut configuration ...
Marcwales's user avatar
3 votes
3 answers
696 views

How to create and save a product with global scope set to use default values programmatically in Magento 2.4.6

I am trying to create and update products in the global scope while making sure any attributes are set to "use default" values set in global scope. The script is triggered by CRON so there ...
Fox's user avatar
  • 211
0 votes
3 answers
80 views

Get attribute text field on front-end product page?

I'm looking to retrieve the value of an attribut with the ID "size_clamp" and show it on the short and long description of my product. I have tried to add the following code directly in the ...
Marcwales's user avatar
0 votes
1 answer
540 views

How to update product attribute via Magento 2 API

I'm writing a Magento 2 client library in nodeJS and I've created some product attributes via this POST API /rest/V1/products/attributes which worked fine but I want to add update method as well, for ...
Asad ullah's user avatar
1 vote
1 answer
92 views

Magento 2 Update Attribute Options Data Programatically [duplicate]

I have created the 2 attributes in the Admin 1. Color 2. Material. I'm going to add the attribute options with swatch image programatically. For this I have created the custom code. Import Color: ...
m2dev's user avatar
  • 73
0 votes
2 answers
285 views

How to create product visual swatch attribute programmatically with images in 2.4.6

I want to create custom products visual swatch attribute with custom images . Please let me know if anyone have any example. Thanks !!
Mukesh Prajapati's user avatar
0 votes
0 answers
34 views

Magento 2.4.4 p4 save attribute brand logo error show A technical problem with the server created an error

Magento 2.4.4 p4 add brand option logo edit attribute page error show -> A technical problem with the server created an error. Try again to continue what you were doing. If the problem persists, ...
arun's user avatar
  • 3
2 votes
1 answer
74 views

Add price with carton and price without carton

I have products such as gaming tables and chairs. I want to add two prices to them: a price with carton and a price without carton. How can I do that?
mdm95's user avatar
  • 23
0 votes
0 answers
291 views

Magento 2 : How to create a graphql api for fetch the best seller product collection with arguments search and filter like in the product graphql?

I am trying to fetch Best seller product collections using graphql like the one below. bestSellers ( pageSize: Int = 20 @doc(description: "The maximum number of results to return at once. ...
sHIFT's user avatar
  • 1
0 votes
0 answers
26 views

additional attributes are collected in one colomn,separated only with comma, i want split into separate columns into multiple columns

in magenro 2 All additional attributes are collected in one colomn, separated only with comma. Here is also "cost" placedi want to Extend the standard Entity Type 'Products', so '...
admin's user avatar
  • 1
0 votes
0 answers
62 views

Wrong pagination size after filtering category product collection with custom condition

I am trying to filter the category products collection on the basis of custom product attribute, i used many ways to override the collection but every method is filtering the records per page rather ...
Jasvir Singh's user avatar
0 votes
0 answers
21 views

load JS after changing the attribute value from dropdown on product add or product edit page backend

We are having brand and model two dropdown attributes on product level. We want to call JS when we change the value of brand while creating new product or editing existing product on backend.
M2 Dev's user avatar
  • 73
0 votes
0 answers
35 views

Load attribute depends upon previous selected attribute

We are having two dropdown attributes on product level Brand and Model. Consider Brand are Mahindra,Kia,Hyundai and Model having Mahnidra Bolero, Mahindra Scorpio,Kia Sonet, Kia EV6, Hyundai i20, ...
M2 Dev's user avatar
  • 73
0 votes
1 answer
206 views

How to make checkbox toggle in product edit form

I add attribute to special product like this $eavSetup->addAttribute( Product::ENTITY, 'dynamic_price', [ 'group' => 'Gift Card Information', '...
Nghia Hoang Trong's user avatar
0 votes
1 answer
179 views

Duplicating a product programmatically does not set the attributes in the copy?

Magento 2.4.6 I am trying to duplicate a product using the \Magento\Catalog\Model\Product\Copier class which is also used in Magento\Catalog\Controller\Adminhtml\Product\Duplicate in the execute ...
user4095519's user avatar
3 votes
2 answers
311 views

Magento 2 How can i customize the product on the page Product Listing Page Widget of Live Search

I am using magento version 2.4.5 live search versions : * 3.0.1 How can I customize the product information displayed https://experienceleague.adobe.com/docs/commerce-merchant-services/live-search/...
Văn Thanh Nguyễn's user avatar
0 votes
1 answer
46 views

Product Attribute for saving Key-Value Pairs

We have a requirement to store values in Product Attributes in Key-Value pairs. I am still searching for the solution, need assistance reagrding the solution.
Abdul Rafay's user avatar
0 votes
0 answers
26 views

Get condition set in the admin widget in the product loop?

Is it possible to get the condition value set in the admin widget and display it in the product loop template? For example, in my theme /lumachildtheme/Magento_CatalogWidget/templates/product/widget/...
Jesse Lange's user avatar
0 votes
1 answer
31 views

How can i pass product attribute manufacturer and SKU to javascript?

I have the following script which i need to add the product brand/manufacturer and SKU <script> window.addEventListener('liveload', function() { IcecatLive.getDatasheet( {...
just_testing_magento's user avatar
0 votes
1 answer
162 views

How to add Product Custom Options for specific Product?

In Magento 2.4, I need to add "Date", "Time" fields for only One Product - That is Belongs to a Separate "Attribute Set" Called "Services". How to add this ...
Saravanan DS's user avatar
  • 1,126
0 votes
1 answer
33 views

Product attribute in Model

I have an attribute product that is a multiple select. I need to fill it with many operation options to select from, like a thousand or more. Is there the possibility to put this multiple selection in ...
Camilo Torres's user avatar
0 votes
1 answer
175 views

How to modify custom attribute of a product with JSON (Postman) Magento 2

thank you for reading me. Is there a way to modify a product´s custom attribute? I´m using postman, i use JSON POST for price and stock but i can´t find the way to update a custom attribute of a ...
Javier's user avatar
  • 1
0 votes
1 answer
274 views

How to Create Bulk Product Attributes in magento 2?

I want to add more than 50 Product Attributes in the bulk. Please let me know the best way to do it in Magento 2.
Jitendra Patel's user avatar

1
2 3 4 5
37