Skip to main content

Questions tagged [product-attribute]

Questions about creating, managing and using product attributes

Filter by
Sorted by
Tagged with
5 votes
5 answers
7k views

Magento 2 : Validate a condition rules based on product attribute

How to validate a condition rules based on product attribute in magento 2 backend: code: $product_id = '3'; // Crown Summit Backpack sku is 24-MB03 $objectManager = \Magento\Framework\...
Divya Sekar's user avatar
  • 1,485
13 votes
4 answers
12k views

Read-Only Product Backend attribute

I would like to create an attribute read only however it look it is not possible. I have tried to pass to addAttribute() 'disabled' =>true or 'readonly' => true with out any success. I have ...
Fra's user avatar
  • 6,985
12 votes
9 answers
16k views

How to hide empty attribute in any magento template?

I want to hide the custom attribute in magento template. My magento version is 1.8.1 We have added custom attribute for our product like brand, dimension, product type etc. but sometimes we didn't ...
Keyframe's user avatar
  • 129
3 votes
2 answers
7k views

Magento 2: Save all product data outside Magento with Images

I have below code with Image Upload which is working fine. But images are not stored in Database Table as mentioned in Order. include('app/bootstrap.php'); use Magento\Framework\App\Bootstrap; $...
Jackson's user avatar
  • 9,939
8 votes
2 answers
39k views

Adding Custom Tabs in Product Detail Page

I have created an attribute with "Product Details" as Textarea in admin panel. Now I need to make it display as "Product Details" next to description tab in product detail page for each and every ...
Raj's user avatar
  • 203
3 votes
1 answer
2k views

Dependent Custom option in Magento-2

How to create Custom option programatically in which both are drop-down and they are dependent on each other . Dependent in the sense , changing value of second drop-down option based on the value of ...
Mr Zid's user avatar
  • 438
14 votes
5 answers
19k views

How to show the drop down attribute value using getData() method in magento 2?

When I try to get data from the material attribute like $_product->getData('material'), it shows the integer value. How can I convert it to the actual front-end value and in which file do I have to ...
user avatar
5 votes
2 answers
11k views

Magento 2 Create Date with Time attribute for product [duplicate]

I have tried to create datetime attribute in Magento 2. Below is my script: $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]); $eavSetup->removeAttribute(\Magento\Catalog\...
Priya Ponnusamy's user avatar
24 votes
6 answers
60k views

How do I get the current product?

I'm trying to retrieve the current product's attributes in a block in Magento 2. I can get a product, like ID 1: $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $product = $...
Tim Trampedach's user avatar
9 votes
4 answers
29k views

How to get the Description of a Magento\Catalog\Model\Product?

I'm in Magento2 and the getDescription(); does not work. I'm in the file Magento_Catalog/templates/product/list.phtml if that's relevant.
Philipp Sander's user avatar
3 votes
2 answers
5k views

How to add multi-select category tree at admin end in magento 2?

I would like to display *Category Tree Names** in multi select field in magento 2 admin end? I have tried with below code but displaying only first cateogires could you please any one help on this? ...
Nagaraju Kasa's user avatar
2 votes
1 answer
7k views

Create product attribute with options in magento2 through rest API

I have created a custom module to create product attribute with option thruogh rest Api. Here is my code samples. etc/webapi.xml <route url="/V1/attribute/attributeCreate" method="POST"> &...
Jafar Pinjar's user avatar
  • 1,949
1 vote
1 answer
947 views

Product edit form issue in admin panel magento2

Here is my etc/adminhtml/events.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events....
Jafar Pinjar's user avatar
  • 1,949
17 votes
2 answers
23k views

Magento 2 : Add Product Attribute Programmatically

How to create Magento 2 Product Attribute Programmatically with type : Text Area.
user avatar
14 votes
2 answers
15k views

Magento 2 get all product attributes without product id

I want to retrieve all product attributes those are available, then convert it to name & value for my select options field. In Magento 1 I can achieve it like this: public function ...
simple guy's user avatar
  • 2,484
9 votes
4 answers
15k views

custom attributes in separate coloumn while export? - Magento 2.0.8

short description what I done: create product attribute set (Chennai) create 21 new product attributes assign to Chennai attribute set set value to attribute while create product export (System->...
Bilal Usean's user avatar
5 votes
3 answers
9k views

Magento 2: Display Custom attribute value under the product name on category page

I want to display custom attribute value under the product name on category page. Attribute type is dropdown and attribute name is Brand. I want to display the brand name under the product name on ...
jack's user avatar
  • 920
4 votes
3 answers
5k views

How to copy a product's attributes value to another attribute?

i want to copy a product's attribute (weight) to another atribute (general_weight). i found this codes, but i don't know what to do with this codes? or where to copy them? $prod=Mage::getModel('...
Moh3n's user avatar
  • 859
2 votes
1 answer
4k views

Magento 2 - Display Attribute on Cart Page

I need to display a few attributes in the cart page. How can i accomplish that?
Front end's user avatar
1 vote
3 answers
21k views

How to correctly update product programmatically - Magento 2

The Context: By decision of the client, the Magento Administrator cannot add products by himself, all he can do is edit them, therefore the addition of products must be done programmatically. There ...
A. Martz's user avatar
  • 305
30 votes
10 answers
96k views

Magento 2: Get product attribute’s select option id,label for configurable product

How to get an option value based on the option id in Magento, or get an option id based on the option code ? Example: how to get the color attribute option id 10 from the label "Red", and get the ...
user avatar
23 votes
2 answers
127k views

Magento 2 : Get Custom Attribute Value of Product [duplicate]

I'm trying to get custom attribut from my product. I tried various methods like below, but non of them worked. $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); /** @...
xhallix's user avatar
  • 692
15 votes
2 answers
39k views

How to export all attributes and attribute sets from one magento installation and import to other installation?

I need to export all the product attributes and attribute sets from my current website (Enterprise Edition 1.12.0.0) and import all of them to a new website (CE 1.8). I've gone through these: ...
Shathish's user avatar
  • 2,689
8 votes
2 answers
10k views

Magento2 How to add row pattern/dynamic rows to the custom product attribute

Magento2 How to add row pattern/dynamic rows to the custom product attribute. Here is the sample output
raheem.unr's user avatar
8 votes
3 answers
16k views

Find the attribute_id by attribute_code

I need to find the attribute_id values of the attributes image, small_image and thumbnail. I know them for my database - 85, 86 and 87, but I need to make my query dynamic, instead of with hard-coded ...
Syspect's user avatar
  • 1,283
5 votes
4 answers
36k views

Find the table for custom attribute values

I’ve installed magento edition version 1.9.2.0 and added a custom attribute catalog_special_name (text field) and i want to know which table stores the custom attribute values for each product.
Asha's user avatar
  • 627
5 votes
2 answers
4k views

Magento Enterprise: catalog_product_attribute not reindexed on product save

I'm using Magento ee 1.13.0.2 and discovering the next problem: I have some of the attributes used in layered navigation - color and size. When I add a new product (simple one) and save it - product ...
feversocial's user avatar
3 votes
3 answers
5k views

Allow SVG on Product images

How do I allow this attribute type to handle SVG?
rickyduck's user avatar
0 votes
2 answers
473 views

Images Related to Attribute Label in View.phtml

I try to explain my problem. I'm working with a Store created by other people and it's difficult to me understanding everything. The Store have a custom template and, in my view.phtml, I found the ...
Zig's user avatar
  • 51
15 votes
3 answers
24k views

Magento : Fastest way to update a product attribute

I'm looking for the fastest and reliable method for mass attribute update. Below are the methods am aware of but I don't know with which I should go. $store_id = 0; Mage::getSingleton('catalog/...
Deepak Mallah's user avatar
14 votes
4 answers
25k views

Get value of selected multiselect attribute

Take the following "car" product: Volkswagen Golf. It has a multiselect attribute car_options with the following possible options and their ids: Airco (id=123) selected Radio (id=124) selected ...
SPRBRN's user avatar
  • 1,307
10 votes
2 answers
16k views

Add Custom attributes to Custom attribute set programmatically

Hi Could someone help me with this? I created a custom attribute set and custom attribute as $installer = $this; /* @var $installer Mage_Eav_Model_Entity_Setup */ $installer->startSetup(); //...
Magento_Newbie's user avatar
10 votes
2 answers
22k views

How to create product's custom attribute with 'yes/no' dropdown using install Setup scripts in Magento 2?

I want to Create a product's custom attribute with 'yes/no' drop-down into my custom module. Please suggest any solution.
Rajesh Hothi's user avatar
9 votes
1 answer
13k views

Adding custom attributes to product list

I'm very confused with a small issue in my catalog/product/list.phtml file. i'm trying to add the Manufacturer attribute that comes with Magento to my grid listing and have added the following code. ...
Chris Morris's user avatar
  • 1,517
8 votes
3 answers
6k views

Magento 2 Reindex Fail `Unknown column 'entity_value.value'` in 'field list'

I am having this error when running php bin/magento indexer:reindex also failing when loading the product: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'entity_value.value' in 'field list',...
Juliano Vargas's user avatar
7 votes
3 answers
51k views

how can i get the the attribute label from the attribute value in magento 2? [duplicate]

I got the attribute value 232 from the below code $_product->getData('farben'); How I get its label from this value?
Divya Muralidharan's user avatar
7 votes
2 answers
5k views

Set default value to custom attribute for all products

I have created the custom attribute (test) for products as a text field with default value('test') from admin panel And assigned that attribute to default attribute set. Now I can able to see the ...
saravanavelu's user avatar
  • 3,951
6 votes
3 answers
12k views

How to get configurable attribute label and value in magento 2?

To use Object Manager is not a proper way but this code is for testing purpose only. I want to get attribute value which is available in configurable products. I have tried with below code, but I get ...
sky's user avatar
  • 1,397
5 votes
4 answers
6k views

Magento attribute change backend_type from varchar to text

My product attribute exceeded the 255 character limit of varchar, so I came across the solution to change its backend_type to text. Should this operation be considered safe (in the terms that it will ...
vladPavlov's user avatar
5 votes
3 answers
5k views

Product List Page Sort by Most View in magento 2.1

We need to bring most viewed, most subscribed and latest options in the sort menu in product listing page of our magento 2.1 application (magento 2.1.7). I already refered the this link Product List ...
Hari's user avatar
  • 77
5 votes
3 answers
7k views

Magento 2 Add select-box with search/filter option

I would like to add select-box with search/filter option. Is it possible, Magento ui-components provide this kind of functionality? If so, how to achieve this? Now I am working with Product Entity - ...
Rob's user avatar
  • 419
4 votes
1 answer
6k views

The configuration parameter "formElement" is a required for custom attribute product field

I just add custom attribute to my product like this: <?php namespace Namespace\Module\Setup; use Magento\Customer\Model\Customer; use Magento\Customer\Setup\CustomerSetup; use Magento\Eav\Setup\...
simple guy's user avatar
  • 2,484
4 votes
2 answers
2k views

Add video to product programatically

OK, I have some bundled product to create and I want to do it programatically. Problem is, I want to add (to MediaGallery) some videos, as it can be done in case of images. It can be done via ...
Bartosz Kubicki's user avatar
4 votes
1 answer
7k views

create product image attribute in magento2

I am trying to create product attribute of image type. I am already created one custom attribute group and some other attribute in it but image type attribute doesn't look good. InstallData.php $...
jaydip sinh Parmar's user avatar
3 votes
1 answer
1k views

Magento2 : How to show the product's attribute value at product details page on PORTO theme?

I have create drop-down attribute on the name of location with drop-down options. I'd like to show the value of this attribute at product details page above add to cart. Copied the file addtocart....
Teja Bhagavan Kollepara's user avatar
3 votes
1 answer
3k views

Global product attribute empty on store view level

We have a strange situation. A global product attribute that is populated at the default config level is empty on store view level. The attribute scope is ofcourse set to global. See the image below ...
snh_nl's user avatar
  • 5,452
3 votes
2 answers
3k views

Magento 2: How to set default value of quantity in new product page

I am new developer of Magento 2. Is Magento provided a way to set default value of quantity in admin new product page?
Haze's user avatar
  • 439
2 votes
2 answers
6k views

Show value of product attribute of type file in magento2 backend

As Administrator I want to be able to upload files for each products in order to show link on frontend. I created upgrade script to create attribute with this properties: 'type' => 'varchar', '...
Aleksey Razbakov's user avatar
2 votes
1 answer
4k views

How to add new column and custom attribute in order email template in Magento 1.9.3?

In this new order email. I want to add a column in this table where i want to show a custom product attribute.. Please tell me how can i add column inside the new Order confirmation email template ...
Aks's user avatar
  • 333
1 vote
4 answers
4k views

How to remove SKU on the product page?

I want to remove the SKU from the product display page. How can I do this?
Moin Malek's user avatar

1
2 3 4 5