Skip to main content

Questions tagged [custom-attributes]

Denotes questions regarding Magento custom attributes

Filter by
Sorted by
Tagged with
1 vote
1 answer
31 views

Title: How to Create Website-Specific Customer Attributes in Adobe Commerce (Magento 2)?

I am working on a Magento 2 project where I need to create customer attributes that have different values for different websites. By default, Magento 2 customer attributes are scoped globally, but I ...
Sanjib Chowdhury's user avatar
1 vote
1 answer
26 views

Apply custom product attribute filter directly in layered navigation

I have one text custom attribute for product. I want to apply directly in Category/Search page and also in Layered Navigation. I have tried by override Magento\Catalog\Model\Layer this file but by ...
Jigar Dhaduk's user avatar
0 votes
3 answers
30 views

How To Add Custom Attribute (PRICE and SKU) Data To Recently Viewed Products Widget

In the widget settings, only name, price, image, and 'learn more' are available. How can we add SKU and PRICE?
kiran's user avatar
  • 597
0 votes
0 answers
21 views

Update REST API Payload using before Plugin

Can I use before plugin in Magento 2 to update Customer Creation Payload? Reason: In Magento, we have one custom customer attribute of dropdown type as you can see below. Now the API is working fine ...
Muhammad Saeed Khan's user avatar
0 votes
1 answer
32 views

How to Add Custom customer Attributes in Account Page?

After adding a custom customer attribute with a dropdown, having values 'A (11)' and 'B (12)', I attempted to display the attributes on the customer account page. However, upon adding the following ...
kiran's user avatar
  • 597
0 votes
2 answers
66 views

Sort by A-Z Product List Page in Magento 2?

I am adding below code but sort not shwoing in frontend. unable to add sort by A-Z
kiran's user avatar
  • 597
1 vote
1 answer
50 views

Magento 2 category attribute value returns null

Vendor/Extension/Setup/Patch/Data/CustomAttribute.php <?php namespace Vendor\Extension\Setup\Patch\Data; use Magento\Eav\Setup\EavSetup; use Magento\Eav\Setup\EavSetupFactory; use Magento\...
Mark Philips's user avatar
0 votes
0 answers
20 views

Custom Attribute not saving into the Sales_Order Table

This is my PLugin : <?php namespace Vendor\Module\Plugin; use Magento\Sales\Api\Data\OrderItemExtensionFactory; use Magento\Sales\Api\Data\OrderItemInterface; use Magento\Sales\Api\Data\...
Rana Zain's user avatar
  • 676
0 votes
1 answer
38 views

Magento 2 update custom column value in sales_order table in a controller file

I have created "custom_column" in "sales_order" table and save the data using event observer.After some actions on that order again I need to change the value of my "...
shankar boss's user avatar
  • 1,453
0 votes
1 answer
130 views

how to create custom attribute for order using data-patch in magento 2.4.6?

how can we create custom order attribute programatically using data-patch in magento 2.4.6 ? I know how to create this customer attribute for order using install schema but currently I am using ...
shankar boss's user avatar
  • 1,453
0 votes
1 answer
54 views

Customer custom attributes do not save data to customer_entity table

I'm creating a rest API and I need to add a custom columns to the customer_entity table and save the value in that fields within API request. Сreated new attributes in the customer_entity table using ...
David's user avatar
  • 21
0 votes
1 answer
60 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
1 vote
1 answer
139 views

Fetch products on category page according to product`s custom attribute in magento 2.4.6

I create an attribute name [show_on_category_page] with yes/no values if it's set to yes then the product show on the category page but if its select no, then product not shown on category page. After ...
Ranvir Singh's user avatar
0 votes
0 answers
32 views

Magento Customer Attribute Value Multi Website Issue

I have multi website setup and, I have create one Custom Customer Attribute named "mobile_number", that shows on create account form at frontend. Now the issue is while creating customer in ...
Mark Philips's user avatar
0 votes
0 answers
88 views

Magento 2 - Add two custom attributes to customer in a new section

In a Magento 2 (2.4.5) instance, I created a new section in CUSTOMER > CUSTOMER INFORMATION, after "Customer View" (thanks to the tutorial of @rakeshjesadiya https://www.rakeshjesadiya....
Samuele's user avatar
0 votes
0 answers
59 views

Show custom attribute of selected child item instead of their parent in product details page in Magento 2

How can i Show custom attribute of selected child item instead of parent/ConfigurableProduct attribute value in product details page in Magento 2 Parent/Configurable product: Here Child Product ...
matinict's user avatar
  • 1,559
3 votes
3 answers
807 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
92 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
241 views

How to create custom Text Swatch product attribute using Data Patch in Magento 2

This code only saves the value (description). But I want to save values in ADMIN and DESCRIPTION both, can anyone help me here: private function addVisualSwatchAttribute() { /** @...
Hafiz Arslan's user avatar
0 votes
1 answer
352 views

Magento 2.4.6: How to create country attribute for custom registration form in

How to create country attribute dropdown for customer registration form. I have added the country attribute in eav_attribute table using the following code: vendor/module/Setup/InstallData.php <?...
Divya Rawat's user avatar
1 vote
0 answers
57 views

Can't get Address custom attribute in custom shipping method collect rates

I've created new custom address attribute and able to save them in the quote_address and sales_order_address table, but i've found bug when i'm trying to get my custom attribute data from my custom ...
Rizky Pratama's user avatar
0 votes
2 answers
94 views

In Adminpanel di.xml for graphql [closed]

Autosmart\CategoryAttributes\Model\Resolver\CategoryAttribute resolve
Noor Mohamed's user avatar
0 votes
2 answers
1k views

custom attribute value not save in the Database

<?php declare(strict_types=1); namespace Vendor\Module\Setup\Patch\Data; use Magento\Eav\Model\Config; use Magento\Eav\Model\Entity\Attribute\SetFactory as AttributeSetFactory; use Magento\Eav\...
Nabeel shahbaz's user avatar
0 votes
1 answer
1k views

Magento 2 add custom fields to order create in admin area

How to add custom input and drop-downs order create in admin sales order creation. I want to add custom field hopefully a new section where when we create a custom order through admin only we can pass ...
jibin george's user avatar
0 votes
1 answer
504 views

REST API Response Modification to Include Custom Attribute

I'm currently using the following endpoint to retrieve the last 50 orders: /rest/V1/orders/?searchCriteria[sortOrders][0][field]=created_at&searchCriteria[pageSize]=50 However, I've noticed that ...
tess's user avatar
  • 1
0 votes
1 answer
165 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
88 views

Cannot display attributes those in Used in Product Listing set to yes

I created an attribute (my_text) as a text field. In stores Attributes Product under Storefront Properties I set Used in Product Listing to Yes. However, the attribute is not displayed on the category ...
Straddi's user avatar
0 votes
3 answers
1k views

Difference between Extension Attributes and Custom Attributes magento 2

I have a question in my mind what is the exact difference between Extension Attributes and Custom Attributes with the example? Is anyone here who can provide me with some ideas ?!
Rana Zain's user avatar
  • 676
1 vote
1 answer
2k views

Custom Customer Attribute field data not showing in Customer Account Information

I have added the field "Favorite Color" to the Customer entity and added it to the registration form. The field properly stores data, as I can see when logging in as Admin and checking in ...
dotancohen's user avatar
  • 1,115
0 votes
2 answers
525 views

Magento 2 Attribute Property - How 'user_defined' and 'system' attribute propety are different?

'system' attribute property tells if attribute is system defined or not. 'user_defined' attribute property tells if attribute is custom (define by developer) or not. It means, if 'system'=0, the ...
Wakar Ahamad's user avatar
0 votes
1 answer
377 views

Remove attribute from the database

When the patch is uninstalled then the attribute is also removed from the database in the Magento 2 is it possible?
Rana Zain's user avatar
  • 676
1 vote
1 answer
321 views

Unable to add attribute to product by InstallData

I would like to add a custom attribute to the product and create an installData.php according to the guide. However, nothing changed after se:up. Please help. app/code/My/Module/Setup/InstallData.php &...
hill2011's user avatar
0 votes
2 answers
434 views

Adding Custom attribute to Quote magento 2

I need to set a custom attribute to Quote entity. I saw some tutorials on how to set a custom attribute to quote_item, followed a similar structure, but it didn’t work. I'm on Magento 2.4.4 Here is ...
David Oliveira's user avatar
0 votes
2 answers
79 views

Create custom attribute for specifi product

i'm tring to create a custom attribute only for a specific product. Into apply_to field i have setted a list "configurable, grouped" , a array('configurable', 'grouped') or single type, but ...
user3665773's user avatar
0 votes
3 answers
238 views

Custom Attribute on order confirmation email in Magento 2.4.5

I'm trying to publish the custom attribute "flash_sale" (dropdown) on order confirmations. I've changed the file: vendor/magento/module-sales/view/frontend/templates/email/items/order/...
Vladimir Chiveri's user avatar
2 votes
0 answers
333 views

Custom customer address attribute not save in saled_order_address table for guest checkout order in magento 2.4?

I Have created a custom address attribute.This field is show in checkout form.Field is created in sales_order_address table also. When i am saving the data from checkout this custom attribute value is ...
Mujahidh's user avatar
  • 2,813
1 vote
1 answer
37 views

Sorting Families on Plp

First product list A1, A2,A3 Product Family A Second product list B1,B2,B3 Product Family B It shows on PLP such as in this way; Family A Title Family A description A1 A2 A3 Family B Title Family B ...
user109253's user avatar
3 votes
1 answer
231 views

Magento 2 : How to fetch custom input data in product attribute form

I have created plugin for add textbox in product attribute form. di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
Darshit's user avatar
  • 53
0 votes
1 answer
47 views

How to create a custom address attribute for customer and show that in edit address in admin?

I want to create a custom customer address attribute called customer_custom_id in the below address.( check the below image.). how can I do that?
Mohmad Ashik M A's user avatar
0 votes
1 answer
272 views

how to copy custom attribute values from quote_address to sales_order_address table

i am using some custom attributes in customer address section.The attribute values are getting in quote_address table but not getting that in sale_order_address table. The file i used to do that field....
Benit's user avatar
  • 23
1 vote
1 answer
216 views

I have added a custom attribute in PDP page, I want to get that value in Observer/SaveToQuote.php to save in the quote table

I have added a custom attribute in PDP page, I want to get that value in Observer/SaveToQuote.php to save in the quote table after the product is added to cart. I am using the event ...
Mohmad Ashik M A's user avatar
0 votes
2 answers
503 views

How to Autofilll custom attributes field in checkout address for logged customer in Magento 2

I created custom attribute fields like DOB, and gender on the checkout page. If you see in the screenshot birthday is a custom address attribute. I tried to fill the attribute field(custdob) in two ...
Manoj Jarial's user avatar
0 votes
1 answer
59 views

add attribute of customer with primary

I want to add an attribute of customer,like phone number,how to add an attribute for primary I find source like this $eavSetup->addAttribute( Customer::ENTITY, '...
DanielHe's user avatar
0 votes
0 answers
285 views

how to get custom product attribute value in model file in magento2

I have created a custom product attribute using data patch in my custom module and it is visible in product configuration in admin, also when I save value in it, it get save to ...
Surjan Raghuwanshi's user avatar
0 votes
0 answers
365 views

How to add custom attributes to checkout summary magento2.4

I am trying to display a product attribute value I have found the template where it is displayed: vendor/magento/module-checkout/view/frontend/web/template/summary/item/details.html I override this ...
kiran's user avatar
  • 597
0 votes
2 answers
291 views

how to get attribute value to show on error message

I have this code that show error message if QTY requested is smaller than QTY on stock. i have created attributes and assign values into them. how to get those values in those attributes shown in this ...
Bayzel's user avatar
  • 187
0 votes
0 answers
68 views

Select multiple options in a single attribute in catalog

Not sure if I'm doing something wrong or if it's by design, or if it's a theme. I've added a custom option (size) and enabled it for catalog pages, it does display as a filter on the left. However I ...
Захар Joe's user avatar
0 votes
1 answer
52 views

Attribute with Image to show next to title

I have created an attribute and when clicked on, I need it to show this image next to the product title on the front end. https://www.ukmadesweets.co.uk/pub/media/logo/stores/1/icon-echo.svg Could ...
Julie - Bounce Creative Design's user avatar
0 votes
1 answer
162 views

Why Magento2 Rest API Deletes Empty/Empty Records in EAV Table for Product. Via MultiStore / Custom Attribute

I update some features of my products from time to time via the REST API. All property values change periodically for each of my stores and sometimes we turn it into a completely blank record. For ...
İsmail Çakır's user avatar
2 votes
0 answers
416 views

Magento 2, How to get and set of custom_attributes value for Rest API

API: /rest/V1/products?fields=items,total_count,search_criteria[page_size,current_page]&searchCriteria[filterGroups][0][filters][0][field]=category_id&searchCriteria[filterGroups][0][filters][...
sky's user avatar
  • 1,397

1
2 3 4 5
14