Stack Exchange Network

Stack Exchange network consists of 175 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
0answers
8 views

How to get/pass a custom product in cart, custom attributes value to a PHP file in Model folder [on hold]

I created a custom text attribute for all the products I created in the backend. It is called freight class. I want to pass the value of the freight class attribute of the item in the cart to a PHP ...
1
vote
0answers
14 views

Filter a custom attribute in Order Grid

I added new attribute and new column to Order Grid : [vendor]\[module]\view\adminhtml\ui_component\sales_order_grid.xml <?xml version="1.0" encoding="UTF-8"?> <listing xmlns:xsi="http://www....
0
votes
1answer
25 views

Magento 2 Can not save custom attribute for customer

I am getting following error while register customer with API. It happen when i am try to save Company field. "Property \"Company\" does not have accessor method \"getCompany\" in class I have use \...
1
vote
1answer
1k views

Magento 2 saving custom attribute to sales_order_items

I have a custom attribute of a product, that I want to have it's value stored in sales_order_items. I have added an extra column in the table sales_order_items. But How can I store the value of that ...
0
votes
0answers
8 views

Prevent Media Attribute from defaulting on image

I'm using Magento 2.2.8. We've created a module for displaying a sizing guide which works wonderfully. My issue though is the sizing guide works by tagging an image on the product with a custom ...
2
votes
3answers
42 views

How to edit custom customer group attribute (column) in Magento 2?

Bonjour ! I try to edit some custom customer group fields in my Magento 2.3 but I don't know how to start. I already have added some columns and displayed it in admin back-office with a module. ...
0
votes
0answers
9 views

Partial attribute Set's detail on custom product are not showing

Here is a setting of a particular attribute set: Crowdfunding item The focus on (Dimension parameter is missing) ts_dimension_xxx I will use it on a custom product type called donation (Not simple ...
1
vote
2answers
344 views

Custom attribute goes in additional_attributes column

When I create a custom attribute in Magento2, at export this goes in additional_attributes column, is there a way to have a new column for every custom attribute? This makes it very difficult to ...
1
vote
1answer
954 views

how to add attribute to sales_flat_invoice table

What is the proper way to add new custom attribute to sales_flat_invoice table? I need to extend this table in order to mark that the payment was made, so subsequent updates do not trigger connection ...
1
vote
0answers
17 views

Magento2 How to add custom attribute to billing information of order rest api response

I want to add a custom attribute to the billing information section of order rest API response instead of showing in extension attribute section. please anyone can help me in this. Thanks in advance
1
vote
3answers
4k views

Get custom category attribute value

I have created a custom category attribute using this tutorial http://gauss-development.com/blog/tutorials/adding-custom-category-attributes-magento/. <?php $installer = $this; $installer->...
2
votes
5answers
8k views

Set value to created customer custom attribute in magento 2

I have created custom attribute for customer using below code. setup/installData.php class InstallData implements InstallDataInterface { const LEGALITY_DOCUMENT_1 = 'user_legality_document_1'; ...
5
votes
4answers
1k views

How to add a unique custom attribute for a customer?

I was able to add a custom attribute called 'Username' to the Magento Customer model. The install-function in InstallData.php looks like this: public function install(ModuleDataSetupInterface $setup,...
0
votes
1answer
29 views

Calculate attribute value in indexer or cron?

This is my observer and its updating my custom attribute every time when I save attributes on catalog_product_attribute_update_before event. namespace MyVendor\MyModule\Observer; class ...
2
votes
2answers
2k views

Magento 2 - Get custom attribute within .phtml file using Magento\Catalog\Block\Navigation class?

I am trying to get a custom attribute value within my phtml file but struggling to get this to work? getData() & getCustomAttribute() doesn't seem to work. I believe this is because I am using the ...
0
votes
1answer
23 views

How to filter attribute by its option value in magento2.2.5?

I want to filter attribute by its option value in Magento2.2.5. I have tried with this: $collection->addAttributeToFilter('collections', 258); But it doesn't seem to work. Any help would be ...
3
votes
2answers
975 views

Custom Attribute in Layered Navigation

I have a custom attribute called m2_price, which is the Metre Squared price of a piece of carpet. I've enabled it to be filterable with results in the layered navigation and this all works fine. ...
0
votes
0answers
22 views

custom_attributes not returning from Magento 2 REST API

Using the Magento 2 REST API, I was able to successfully create a new product attribute sending a PUT request to V1/products/attributes/{attribute_code}. In the request, I added a value in the ...
-1
votes
0answers
35 views

How to get custom attribute front end value / label in Magento 2?

I am trying to get the frontend value of a custom customer attribute. I have the following code protected $_customerRepositoryInterface; public function __construct( .... \Magento\Customer\...
1
vote
2answers
97 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 ...
1
vote
0answers
26 views

How to add new custom field in checkout/shipping page and save it in db in Magento2.2.5?

I want to add new custom field in checkout/shipping and want to save them in the following tables in Magento 2.2.5: sales_order sales_order_address sales_order_grid I have referred this link https://...
1
vote
1answer
438 views

View Magento 1.9 custom attributes in custom block

I would print just some custom attributes in a custom module block. I used this code in custom block: {{block type="core/template" name="attributesView" template="catalog/product/view/...
2
votes
0answers
200 views

Adding custom attributes to states and a dropdown to cities

I would like to change the way the users enter addresses, and I have several doubts about the best way to do it. First, I need to add a drop down for states/provinces to other countries, for what I'...
0
votes
1answer
20 views

Magento2 Showing a custom attribute on category listing page

I have a magento2 based website and I am wanting to show a custom attribute on the category listing page. My issue seems to be that on desktop and tablet the products are shown 3 across and on mobile ...
2
votes
2answers
48 views

Customers custom attribute with dropdown is not working

I need to create a custom attribute for customer entity with the Yes/No. I tried to use boolean type and also select method. But nothing has worked. Below are my work: Try 1: (Type as select) $...
0
votes
2answers
2k views

Show brand attribute in product listing

I would like to show the Brand attribute under the product name on the listing page. Attached is a screenshot for reference.
1
vote
1answer
1k views

Magento 2: How to Set custom product attribute value on product save

i have created an observer, event on before product save to set custom product attribute value, here is my code. etc/adminhtml/events.xml <?xml version="1.0"?> <config xmlns:xsi="http://www....
1
vote
1answer
33 views

Efficient method to load/get and assign multiple custom options/attributes from quote item?

Is there a more efficient way to load and assign quote item custom options/attributes? This is code in my Observer: public function MyFunction(Varien_Event_Observer $observer) { $QuoteObject = Mage::...
3
votes
0answers
245 views

How can I remove a custom attribute from a product via REST?

I can add or change a custom attribute of a product, i.e. via curl -X PUT --header "Content-Type: application/json" \ --header "Accept: application/json" \ --header "Authorization: Bearer MYTOKEN" -d ...
1
vote
0answers
43 views

Magento 2 : Custom attribute create with “Use default value” checkbox and that functionality

I created custom attribute under custom eav_entity_type. Attribute was created successfully and display also in admin. But, it's not display "Use default value" checkbox when, I switch to other store....
0
votes
0answers
15 views

Get custom customer address attribute on email

I have a module with which I create my attribute. I can get it and show it in the admin panel, but not when the data is recibed on checkout process. This is my installer code: public function ...
0
votes
3answers
2k views

Add Custom attribute from Sales_Order table into New order email template?

I have create new custom attribute on Sales_order table name "QR_Code". How to insert this field into my new order email template? Thanks kllee
1
vote
1answer
2k views

I need to add custom Order Item attribute and Quote Item attribute

I need to add custom custom Order Item attribute and Quote Item attribute at when product add to cart. Attribute value store in quote item table but not in order item table. config.xml <?xml ...
1
vote
3answers
4k views

How do you add a custom attribute to the customer grid in adminhtml (Magento2)

Seriously why is this such an exercise in frustration? I've added my custom customer attribute using the EAV model, the PROPER way. I'm able to save this attribute when I save a customer. I've ...
2
votes
0answers
31 views

Magento 2 Save custom customer address attribute in customer edit form using extension attributes

I want to save custom customer address attribute in Customer Edit Form under My Account section. I have created an attribute using Setup script and save that attribute using extension attributes. ...
0
votes
0answers
13 views

How to Add Wishlist Custom Attribute in Magento1?

I want to add customer attribute in magento wishlist in order to save additional field in wishlist table.
0
votes
1answer
36 views

How to get the custom attribute of products from the cart?

There is an attribute in the product AllowSameDayDelivery how can I get it out of the product? I got the products ids from the cart, But how do I get the attribute now? <?php namespace Ronis\...
4
votes
4answers
6k views

Product custom attribute import with CSV Magento 2.2

I am trying to import product with CSV in Magento2. In first case all attributes are default attributes so import works fine. Now In second case I have added some custom attribute in my Magento 2.2 ...
2
votes
2answers
45 views

Show Delivery Time over or under Availability on Products Page

I am completely new to magento. I use Magento 2.3 and I created an attribute Lieferzeit under Stores->Attributes->Product and set visibility to yes. Further, I set the Attribute to a group in Stores-...
4
votes
3answers
945 views

(Zend_Db_Statement_Exception): SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'created_at' in where clause is ambiguous

I added sku, country_code and product name in the order grid. All works fine but when I filter Orders by Created at it throws following error Exception #0 (Zend_Db_Statement_Exception): SQLSTATE[...
1
vote
0answers
26 views

How to add attribute advance properties in magento 2.2.7

How to add attribute for product attribute advance properties in magento 2.2.7 I want to implement yes/no attribute for product and second attribute for image attribute for Product Attribute
4
votes
2answers
226 views

Magento 2 | Access custom order attribute

I created an custom attribute for orders: UpgradeSchema.php <?php use Magento\Framework\Setup\UpgradeSchemaInterface; use Magento\Framework\Setup\SchemaSetupInterface; use Magento\Framework\...
0
votes
2answers
116 views

How to add attribute for RRP in frontend?

In Magento 2.1 CE, luma theme, I'm trying to add a product attribute called "RRP" (Recommended Retail Price) and like to display it on the frontend product page and in catalog near the other prices. (...
0
votes
1answer
40 views

Get custom attribute value in Magento2 product page

I have created one custom attribute through code, in admin product edit page,but i wolud like to display that value in product detail page, How to get the custom attribute collection in product ...
0
votes
0answers
32 views

Boolean attributes not displaying any options when used as part of conditions or actions in a promo rule

I've got a couple of boolean custom attributes which I'm having an issue using in cart or catalog price rules. These attributes appear correctly on the product edit pages and can be used successfully ...
1
vote
1answer
76 views

check if product attribute exists in upgradeData.php

I have a custom product attribute named additional_cost. Now I want to delete this additional_cost attribute or I want to update it. In order to do this both I need to first check if this attribute ...
2
votes
0answers
64 views

Magento: 2 Broken image in wysiwyg after overriding the file

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 ...
7
votes
1answer
564 views

Magento Too many tables error bulk updating products

This morning while selecting and enabling some one hundred products in magento i got this mysql too many table error Below is the snippet from the log file a:5:{i:0;s:92:"SQLSTATE[HY000]: General ...
2
votes
4answers
2k views

How to update product eav attribute in magento 2

I want to update product custom attribute when custom module is upgraded. Attribute code is product_brand and i want to set it's is_used_for_promo_rules to 1. Any help appreciated.
0
votes
0answers
14 views

layer navigation using custom attributes in magento 2

i have to create filters with products attributes in magento 2,from where i can filter my results on category page, as i have already side bar but i want to create something which should be in drop ...