Questions tagged [custom-attributes]
Denotes questions regarding Magento custom attributes
640
questions
0
votes
0
answers
11
views
swatch-renderer.js custom attributes
How to get custom attribute value in swatch-renderer.js for selected simple product on configurable product page, and show it after on one class?
0
votes
0
answers
17
views
render attibute on final_price.phtml for configurable product
I would like to to change final_price.phtml (Magento_ConfigurableProduct/templates/Product/Price/final_price.phtml) file for configurable product and add the newly created text attribute under the ...
0
votes
0
answers
22
views
Magento 2 Custom attribute won't update for particular product
I've created few custom attributes where customer can list a cons and prons of the product. After filling 'ms_cons' and 'ms_prons' text displays on the frontend.
I have problem with one particular ...
0
votes
1
answer
47
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 ...
0
votes
0
answers
23
views
How to set custom attribute of customer address entity using observer sales_model_service_quote_submit_before
I have an event like this
And this my observer
The district value of order and quote was successfully inserted into sales_order_address. And now, I have some problems to inserted the district value ...
2
votes
0
answers
20
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][...
0
votes
1
answer
29
views
Get customer custom attribute value without loading the customer
I'm trying to get custom customer attribute value (for attribute code abn_no) without loading the customer but not able to find any way to get it.
Is there any way to get custom customer attribute ...
1
vote
1
answer
26
views
Custom attribute created programmatically not working properly - Magento 1.9
I'm developing a module that creates configurable products, it's simple products and the attributes used to create this configurable (if not exists). All seems fine, products are created, associated ...
0
votes
1
answer
47
views
How to add custom attributes to Customer Export? (from the import/export admin page -> Customers Main File)
I need to add custom attributes to the Customers Main File export (from the Import / Export admin page), but I can't seem to find a way to do it.
I believe I can create a preference to override \...
0
votes
2
answers
33
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
0
votes
1
answer
29
views
Magento 2 get custom customer attribute displayed value
I'm using the module Amasty's customer Attributes to create custom customer attributes,
I like to get custom attribute displayed value but i got the option value.
I like to get the value in data-title ...
0
votes
2
answers
41
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. ...
0
votes
0
answers
306
views
custom sorting is not working in magento 2.4.3 p1
enter code hereI am created a custom sorting in magento2.4.3p1 but it is not working in the frontend.
I am face issues is
We can't find products matching the selection.
Toolbar.php
<?php
namespace ...
0
votes
1
answer
54
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 ...
0
votes
1
answer
20
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 ...
0
votes
0
answers
29
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 ...
0
votes
1
answer
127
views
How to sync custom columns from sales_order to sales_order_grid in magento 2?
I create 2 custom columns in sales_order table and sales_order_grid tables.
As far as I know columns will be sync by cron job if name of both tables are same.
So I run a cron but data from sales_order ...
0
votes
0
answers
15
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.
0
votes
1
answer
35
views
How can I get an attribute option id from its label?
Magento 2.4: I have a custom product attribute called shop_status. It has two possible options:
ACTIVE
INACTIVE
I would like to get the option ID from the text label, eg:
$id = $attribute->...
0
votes
3
answers
100
views
save custom billing attribute value from order
I have a problem with saving the custom billing attributes.
I added attributes into the Customer Address Entity table.
all fields of billing address are saved to DB without my custom attribute.
My ...
0
votes
1
answer
37
views
Can you auto-fill a custom field when a product becomes out of stock? CE2.3.2
I have a custom text-field called 'Back in stock' (in orange) which displays on the product grid once a product is out of stock and the field has content.
My question is: is there a way of ...
0
votes
1
answer
37
views
How do I display a custom text-field attribute on the product grid. CE 2.3.2
Sorry if this is a rehash, but I can't find the exact answer to my problem.
I'm looking to display the contents of a custom text field just under the product name on the category page grid.
I have ...
1
vote
1
answer
26
views
I'm trying to define a new customer address attribute that will be available in all the customer address forms (backend, frontend, checkout)
So far I have managed to save the value in quote_address and sales_order_address when placing the order how can I save the value in the customer_address_entity_varchar table. when customer address ...
0
votes
1
answer
29
views
Magento 2 How add to custom attribute placeholder only on create account page?
I cannot figure out how I can add placeholder for some custom attribute on create account page.
In this file: view/frontend/templates/customer/form/register.phtml i see some code which output html for ...
0
votes
0
answers
19
views
Integrity constraint violation error while saving custom multi-select product attribute
I'm getting Integrity constraint violation error as below while updating custom multi-select product attribute.
[2021-11-11 08:36:17] main.CRITICAL: SQLSTATE[23000]: Integrity constraint violation: ...
0
votes
0
answers
51
views
How to make custom product attribute Inline Editable in Product grid for Magento 2?
I have set a working Inline Editor in the admin product grid, but it can edit only the standard Magento 2 attribute such as name, price, qty...
When I put my custom attribute in the product_listing....
0
votes
1
answer
122
views
Magento2.3.5 Add and Save custom attribute in create new order from backend admin
I've successfully added custom attribute to checkout and when creating the order is saving in quote, and order table, but how to implement the same when creating an order via admin backend?
Thx in ...
0
votes
1
answer
78
views
Display product attribute dropdown box value on product page, with custom placement?
I'm building a Luma child theme and I want to display my "brand" product attribute above the product title on my product page.
I am currently using the following code in my child theme's ...
0
votes
2
answers
65
views
Custom attribute not working in cart
We have an "Yes/No" product attribute and we need this information on product image renderer.
So I have overrided the ImageFactory.php with di preference.
The code looks like that:
private ...
0
votes
0
answers
47
views
Update product's custom_attributes in Magento 2 using Rest API?
I need to update the product custom_attributes. I use the rest API and XML (this is important) in the Postman. But I get an error message (see Attachments). If I try to update only one ...
0
votes
0
answers
50
views
Can't set configurable product (has_options, required_options) properly when created with API REST on 2.4
I'm trying to create configurable products and related simples programmatically using API REST. The customization is only based on the "Size" attribute. The products are created, the simple ...
1
vote
1
answer
51
views
Increase the attribute length
I have a custom attribute that is multi-select for a product along with 200 options.
When I tried to assign all the options. What I found is that there is the limit of 255 is it possible
to increase ...
0
votes
0
answers
44
views
Create a text attribute programmatically at run time
Magento2 I am creating a script to import products programmatically, in between I want to add a code to create a text attribute programmatically. How can I achieve this?
e.g. <tag>100,200,300<...
0
votes
0
answers
17
views
billing address API magento 2.4
I need to send some data from an external API to billing address API as array.
how can I do it? I tried lots of ways but no result
0
votes
0
answers
65
views
Create custom multiselect country dropdown product attribute
I need to create a custom product attribute, which allows the admin user to select multiple countries from the edit product section in the admin. (Essentially - on a product detail page on the ...
1
vote
2
answers
118
views
How to get attribute information of a custom field in registration form
I have created a custom attribute for customer in Magento 2 site.
The HTML of the field is this:
<input type="text"
name="<?= $block->escapeHtmlAttr($...
0
votes
1
answer
178
views
Custom Customer Address Attribute save value
I've added a custom shipping and billing address input field on checkout via layoutProcessor. The field shows up fine but when I submit the order the value of the custom attribute is not saved as the ...
0
votes
1
answer
17
views
Additional Data is not being imported into produces (full imports and focus additional data imports)
FIRSTLY I should note that all product data is importing correctly except the additional_attributes column.
I've been struggling for the past few hours with getting additional data imported into my ...
1
vote
0
answers
29
views
Show Custom Category Attribute in Specific Categories. Magento 2
I've created a custom attribute using
Setup/InstallData.php
<?php
namespace Vendor\Extension\Setup;
use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\...
0
votes
1
answer
93
views
Magento 2 - Add custom attribute to custom section admin
I installed my "customsection_adminbackend" module which adds a new menu item in the Magento 2 backend.
For now in this new section there is only a text "Hello world", but I would ...
0
votes
0
answers
95
views
Magento 2: Get used and unused attributes
I want to get list of attributes (not only products or categories) that are used and that are not use.
I try this Delete unused attribute values one but it's only for product attribute, this is for ...
0
votes
0
answers
12
views
Product name attribute as Dropdown
I'm trying to change Product Name attribute from Text to Dropdown.
I have created new Dropdown attribute in the backend and it's working fine.
but in frontend its seems that I should change the ...
0
votes
0
answers
33
views
Load attributes on product page
I hope you can help me to find a solution. We're stuck ...
We want to display a custom attribute on the product page. The custom attribute should show the expected delivery date (available, delivery ...
0
votes
1
answer
94
views
How to access custom attributes from the current product in JavaScript?
I added the following in view/frontend/layout/catalog_product_view.xml:
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:...
0
votes
1
answer
203
views
Magento 2.3.5. Checkout - Custom attribute failed to save for logged in user
I have an issue with a custom attribute in the shipping address failing to save for Logged In customers when he clicks on "Add new address" in checkout. If he uses an already saved address ...
0
votes
2
answers
520
views
Magento 2: Update default value for custom customer attribute programmatically
We have a custom boolean customer attribute created from installSchema script like below:
$eavSetup->addAttribute(
\Magento\Customer\Model\Customer::ENTITY,
'test_attribute',
...
0
votes
0
answers
42
views
Magento 2.3 hide customer attributes from API call
As far as I know, in order to have a custom attribute in the API output, magento needs the attribute to be defined in a extension_attributes.xml file.
I've created a customer custom attribute the ...
0
votes
0
answers
35
views
How I can do calculation of custom product attribute with price of grouped and bundle product?
I am customizing product price by adding custom product attribute to product price. It's working fine with simple and configurable products.
But it's not working with bundle and grouped products. I am ...
0
votes
1
answer
37
views
I have added one custom attribute for product named percentage. How can I add that attribute to product price after adding that product into cart?
I have tried below code. However its working fine but other products for which custom attribute is not being added from admin, I am not able to add to cart such products.
1
vote
1
answer
885
views
Uncaught Error: Call to undefined method Magento\Quote\Api\Data\AddressExtension in magento 2
I have try to add custom field(textbox) in shipping and billing section on checkout page. I have create extension attribute like this :
<?xml version="1.0" ?>
<config xmlns:xsi=&...