Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [custom-attributes]

Denotes questions regarding Magento custom attributes

0
votes
1answer
40 views

Attribute not showing category

I am using Magento 2.2 for my store. I have created a custom attribute. I have modified list.phtml and catalog_product_view.xml and I have created a myatrribute.phtml. I have also enabled visible in ...
0
votes
0answers
19 views

how can i update custom attribute value from customer [duplicate]

i need to update custom customer attribute value programmatically, i tried this: public function userapprove($id){ $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); ...
0
votes
1answer
26 views

adding custom attribute to category

I'm trying to add a new custom image attribute for category, following the guide here "https://webkul.com/blog/add-custom-image-attribute-category-magento-2/comment-page-1/#comment-16835" However, ...
1
vote
2answers
20 views

Custom Customer Attribute not being read from Request

I'm trying to add a new Custom attribute to the Magento customer model, and I think that I've set everything up correctly from what I've been able to scour off of this website & google, but I'm ...
0
votes
1answer
34 views

How to Filter a Custom Column in Product Listing?

I have created a custom column in Product gird by a module, which shows Parent product's SKU there. It's working fine but when I try to filter it Magento gives "Something went wrong with processing ...
0
votes
0answers
36 views

Product drop down attribute with custom source model not display in layered navigation Magento 2

I have created a product's attribute select type (dropdown) source model of this attribute from custom table. Everything is fine but when I set this display in layered navigation, It's not showing in ...
0
votes
0answers
9 views

Magento2 Product Custom Attribute needs load()

Q1. Why does getData() return null, I need to do load() first? They seem to be the same class type.. function (Magento\Catalog\Model\Product $product): $product->getData('my_attribute_1'); //...
0
votes
0answers
17 views

Magento 2 custom address attribute

I have created custom address attribute "extension" as varchar type through InstallData. I have also added Extension field in customer registration form. Since I want customers to enter some value ...
0
votes
1answer
40 views

How to have 2 different registration forms in one module in magento 2 (B2B, B2C)

Trying to add different attributes to 2 different registration forms. If anyone can advise where i can make this change please ? see below for the file structure that i Currently have: 1. module....
0
votes
0answers
47 views

Magento 2.2 Display Product Custom Attribute in products in Home Page

I have custom attribute called "hasgift" and its Boolean (yes, No), and trying to display it's value in products tab Module in homepage. But Its Only Give Me (No) Vaue. I have Used Same Code in ...
0
votes
1answer
58 views

Magento 2 plugin change price of products that have a custom attribute with

I'm trying to change the prices of products with a plugin. And it works, basically. The problem is this: i only need to change the price of products that have a specific attribute, not the price of ...
0
votes
0answers
9 views

Is it possible to Extract Attributes with its all Values and their value Id's using My SQL in Magento 2

Is it possible to Extract Attributes with it's all Values and their value Id's using My SQL in Magento 2?
0
votes
1answer
26 views

What new tables need to be created when building module for custom attributes?

Magento 2.2 -- I am trying to build a module that would allow for custom attributes to be created in the admin panel. At this point, I'm stuck on what tables need to be created to allow for that ...
0
votes
1answer
21 views

Unable to get custom customer data in a standard manner? [duplicate]

I have added few custom attributes and one of them is is_mobile_verified while registering I dont set any value for this however, while creating the attribute I set default value as 0. now after ...
1
vote
1answer
43 views

Magento 2 get custom attribute of a single product inside a plugin

Hello Everyone :) I'm in a bit of an empasse now: I'm building a module to edit the price of products that have a custom attribute by multiplying their weight by a variable. Now, almost everything ...
0
votes
0answers
9 views

Fetch created new attribute of product in order summary of checkout page

I have created new attribute for products and given yes/no option to them. How can I fetch that new attribute data in the order summary checkout page
0
votes
1answer
37 views

How to move attributes in magento 2.2.x?

I want to move some attributes, but I don’t see any settings for this.
3
votes
2answers
52 views

How to hide a custom text attribute which displayed in product edit backend

I am using Magento 2.2.5 I need to hide a text attribute which I'm using to save serialized data of custom options of product. I think this can be done using adminhtml/ui_component/product_form.xml ...
0
votes
1answer
24 views

How to save serilized data in product's text backend_type custom attribute

I'm working in Magento 2.2.5. Basically, I have created a custom product attribute serilized_data with text as backend_type by using below file and want to save custom options of product in this ...
0
votes
0answers
36 views

Export csv Not working for the custom attributes customer grid Magento2

Below showing code is my customer_listing.xml, export csv not working when selected checkbox's export from grid. <listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
0
votes
1answer
35 views

Magento 2 save product custom attribute in order to retrive them on sales information and otder email

I have created a custom attribute that shows in product detail page like colour and size attribute, I want them to be saved on order placement so that i can retrieve them in order information, order ...
0
votes
0answers
79 views

Magento Customer Grid Custom attribute can't export csv and export xml

Magento Customer Grid Custom attribute can't export csv and export xml, Showing error, how to add custom attributes to the customer export. PHP Fatal error: Uncaught TypeError: Argument 2 passed ...
0
votes
0answers
59 views

If attribute value exist, then echo, else hide

With many custom attributes sometimes it is needed to show additional information on a product, and sometimes just hide it. How do I do that?
0
votes
0answers
45 views

how to get custom attribute value for related products in product details page

I am overriding default related.phtml in custom theme Magento_Catalog but data is not showing properly.If Any One have idea please help me. <?php if ($currentProduct = $block->getProduct()) {...
1
vote
0answers
29 views

Migrated custom attributes fail

With our migrated M2 shops the custom attributed were migrated. But now the problem is that we must make a choice between 2 options. The attribute is in mysql a varchar but then we can't change the ...
1
vote
2answers
78 views

How to show product custom attribute in items ordered section in magento2.2.0?

How to show product custom attribute with values in items ordered section in magento2.2.0? Refer screenshot The above image is my custom attribute(PCB Master) In the above image i need to show my ...
0
votes
1answer
52 views

additional catalog attributes not working in catalog_category_view

In my templates I want to have access to custom product attributes on the detail page, the cart and also the category list view. This can be (or should be) easily achieved by creating a Vendor/Module/...
0
votes
1answer
90 views

how to get current products custom attribute value in block(phtml) to display in products details page magento2?

Here i am trying to get current products custom attribute value in block(phtml) and after that i want to show these custom attributes values in products details page using block,phtml file ...
0
votes
0answers
56 views

Get all product attributes on product detail page magento 2

I am trying to gather product attributes on the product detail page. We have the default attributes disabled through xml, and are trying to load them from within a custom phtml template file. I am ...
0
votes
1answer
99 views

Magento 2 Custom attribute in checkout summary affects payment method

I have created a module that adds custom attribute "master_id" in checkout summary, I am not sure why the payment method not working it showing no payment method After adding this module the payment ...
0
votes
0answers
15 views

Set custom value from query result for product attribute in magento 2 admin panel

I need to show one custom field for each product in admin panel like the screenshot attached. I can create custom attribute with text, that is fine but for each product i have to set the values on ...
0
votes
1answer
24 views

Is it possible to hide custom attribute from product editor and assign a default value?

Goal Create a custom boolean attribute called "is_type" & default the value to "1" Assign custom attribute to a single attribute set Products assigned to this attribute set automatically have "...
0
votes
0answers
25 views

Cannot get attribute after adding it programmatically

Very often I can't get attribute in my own console command using $this->attributeRepository->get(\Magento\Catalog\Model\Product::ENTITY, $attributeCode); after adding attribute using $eavSetup-&...
1
vote
2answers
50 views

Magento 2: Cant get custom attribute when configured in catalog_attributes.xml file for mincart

I need to get a custom attribute value to Min cart, But I am missing some thing on the catalog_attributes.xml to get the attribute value. di.xml <?xml version="1.0" encoding="UTF-8"?> <...
0
votes
1answer
95 views

Magento 1.9 Rest API - Fetch Product Data with Custom Attribute

I am using module (in Magento 1.9.3.10) that extends the default Mage/Product model by adding a new attribute named Status with a corresponding file named Status.php residing in Package\ModuleName\...
0
votes
0answers
33 views

The value of attribute “Warehouse_SKU” must be unique

In Magento 2.2.1 admin, I have set the unique value of attribute_X to "Yes" like so: Properties -> Advanced Attribute Properties -> Unique Value -> "Yes". Two different products in the catalog ...
1
vote
0answers
29 views

Auto Add Product Attribute Options when Creating a new Product by Rest API

Is there a way to tell Magento 2 to: Send custom_attribute Label instead of Value; Auto create option in case the Label doesn't exist yet. I was able to do it with Magento 1 API, but I can't find a ...
1
vote
3answers
36 views

Backend Only Attribute

So I've setup a 'discontinued' attribute in Magento 2. I plan to use this to set a badge on the product to let customers know if a product is discontinued. I was able to create the attribute and load ...
1
vote
4answers
332 views

How to display color and size in magento 2

I am using magento 2.2. I've both color and size attribute and I want to display on frontend I tried and colors are showing in left side:
0
votes
1answer
48 views

Create custom attribute in catalog category display setting

We are working to add custom attribute in catalog category display setting. but it not working in my server could you please check code and let us now where i made mistakes. code/Tendersoftware/...
0
votes
1answer
95 views

Changing attribute type (dropdown to textfield)

I'm wondering if there is a simple way to change an attribute from dropdown to text field? We had a development shop set up our Magento website but they made the fields dropdown and we have entered ...
0
votes
1answer
86 views

Magento 2 order REST Api append Custom Attribute

I want to get Custom Attribute value which is already saved in database table, i just want to append it to my Sales order REST APi, i have tried adding extension attribute , i am able to get set and ...
0
votes
0answers
46 views

In Magento 2.2.5 The Custom attributes values are not coming in Collection

In Magento 2.2.5, I am creating a Custom Product and Customer attributes. It is saving fine, but while retrieving, It is not coming in the Collection. Here is my Code. UpgradeData.php $eavSetup = $...
0
votes
1answer
16 views

Displaying custom attribute made add to cart and short descrption hide on product view page

I was trying to display a custom attribute to product view page and overwrote the base file with child theme but after that only the custom attribute is showing and rest has disappeared i.e add to ...
0
votes
0answers
47 views

Magento2: Shipping method shows based on customer group

How can I show shipping method based on customer group. I created custom attributive for named retailer_status, (Approve, Reject). Please let me know if anyone has any idea. Like I have enabled Two ...
1
vote
0answers
32 views

Add attribute link in admin panel is showing as page isnt working!

When we try to create an additional attribute from the admin panel,it shows the following error: This page isn’t working restaurantware.local is currently unable to handle this request. HTTP ERROR 500
2
votes
1answer
37 views

visibility attribute value is not rendering from product collection in magento 2

We need to display the visibility of the product in category page, but currently we are not able to fetch its value from product object. We tried with $_attributeLabel = $_product->getResource()-&...
2
votes
1answer
66 views

Magento 2 How to hide products from entire shop based on custom attribute value

Is there any way by custom code or plugin, products can be hide from entire frontend shop based on custom attribute type yes or no ?
1
vote
0answers
39 views

Magento: 2 Broken image in wysiwyg after overriding the blog

I have override the file vendor/magento/module-customer/Model/Indexer/Source.php in this path Magenticians\Moduleproduct\Model\Indexer\Source.php just adding one function public function ...
4
votes
2answers
298 views

Magento 2 : Unable to set custom customer attributes programmatically

I have a cron job that runs once a day, that reads a file uploaded to the server, and registers users from that file. The code works fine, but now I added a custom attribute to the customer (lets call ...