We changed our privacy policy. Read more.

Questions tagged [product-attribute]

Questions about creating, managing and using product attributes

Filter by
Sorted by
Tagged with
0
votes
0answers
17 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
1answer
28 views

magento 2 Unable To get Product Attribute

I am trying to fetch product attribute on cart page but it is giving me a null value below is my code path:-V\M\Plugin; class GetAllRates{ protected $_logger; protected $cart; private $...
0
votes
0answers
12 views

I can't associate simple products to configurable ones if they have 0 quantity

I use the following code to associate (I call it from a loop) simple products to a configurable one. it works fine except if the id of the product correspont to a product with 0 quantities, in which ...
0
votes
0answers
11 views

Add layered Navigation filter as In stock availability magento2.4

I want to add "Stock availability" as layered navigation filter. but I can't find this attribute in attribute set.
0
votes
0answers
6 views

Magento 2 - can the url_key product attribute be safely excluded from Search?

I recently did an analysis for a client on a Magento 2.3.5-p2 instance regarding some products being shown in Search results which didn't have the searched keywords in their sku, name and ...
0
votes
1answer
37 views

Can we update auto Product Attribute On Base of Stock Status In Admin Product Magento 2.4?

I want to update automatically Product Attribute on Base of Stock status in Product, I have created few attributes with Yes/NO. Now I want when the product will become out of stock that attribute will ...
0
votes
0answers
14 views

Add Calculated Column in Admin Product List

currently i can't find an answer and hope someone can guide and help me to solve my problem. In the shop i support the qty of a product are packages of items. We have added a field to the product in ...
0
votes
1answer
31 views

Add Custom Attribute Text In PDF Invoice after Product Name in Magento 2.4.0

How to i can add attribute text in pdf invoice after product name in Magento 2.4.0 ? I am writing this code but not effecting. $id = $item->getProductid(); $objectManager = \Magento\Framework\App\...
0
votes
0answers
18 views

Magento2 - How to add custom product attribute of type is Only Year field?

Greeting of the day! As per our requirement wise, I need Custom Product attribute and their type is the only YEAR field, so that how can I create the date year attribute only allow to select the year, ...
1
vote
1answer
19 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
1answer
36 views

Magento2: How to show multiselect product attribute lable on product detail page

I am using magento2.3.x I have created a dropdown attribute(product attribute) from admin. now I have showing this attribute on product page using below code:- file path:- app/design/frontend/Vendor/...
0
votes
0answers
14 views

how to get attribute product when order and save to table in database

I have add new custom attribute for product. I want get custom attribute of product when order and save to new column in sales_order_item.
0
votes
1answer
33 views

How to move Admin Product Edit form "images and videos" section into under "general" section?

I would like to move the Images and Videos section under the General section. I have tried with uiComponent and Modifier Pool. These Both methods are Magento's default method for modification product ...
0
votes
0answers
18 views

Add column attribute in product in category grid

I want to add a column of a newly created boolean attribute, but it doesn't work, I have read blogs where they give the same advice but it hasn't worked I have followed the following steps: Create ...
4
votes
1answer
41 views

Magento 2 - Search result not working properly on dropdown attribue

I have a dropdown attribute brand Use in Search is set to "Yes" Search Weight is set to 10, tried with 7 as well In configuration Search Engine is set to MySql There are more than 100 ...
0
votes
0answers
10 views

Unable to edit product attribute price

I have added a custom button (Custom Price) to Edit Product page, which fills price input field with a new value, received by Ajax call. Input field receives a new value, but after I click "Save&...
0
votes
1answer
46 views

Magento 2. Can we display custom attributes on product page after SKU?

I created custom product attribute - Manufactures SKU. Want to display in product page after SKU.
0
votes
1answer
27 views

How to GetData of attribute value in child

I am trying to get attribute value "barcode" for child product in magento2. Below code working for cofigurable parent product. $_product = $this->getProduct(); $_barcattr = $_product->...
0
votes
0answers
11 views

Magento2: How to create global configuration of a custom product attribute?

I am using Magento 2.3.1. I have created a custom product attribute using data patch, attributed created successfully and I am able to save value in this. Now I want to create global option for this ...
2
votes
2answers
57 views

Magento 2 : How to bulk update product atributes?

I am trying to update bulk product attributes where i need to update attribute to "allow in search". Any way to achieve it ?
0
votes
0answers
11 views

How can i set upload field at product video url at product edit time in magento 2?

how can i upload product video direct from system here i convert video url text field to file upload but they not working can any one help me. How can i archive product video upload direct from ...
0
votes
1answer
28 views

How to get custom product attribute from productCollection

I use magento 2.4. I have product collection in catalog view. There I have loop: $_productCollection = $block->getLoadedProductCollection(); . . . <?php /** @var $_product \...
0
votes
1answer
47 views

Product Attribute Magento 2 Cart Checkout don't show

In my checkout cart I got 2 attributes color and Talla but only work color, In the admin the attribute talla is working When I debug the phtml app/design/frontend/mytheme/default/Magento_Checkout/...
0
votes
0answers
15 views

Magento 2.4: Attribute option label is not working for different store view

We have created two websites and want to show the different attribute option labels with respective to the locale of the website. However, the scope of the attribute is global and it's not working ...
0
votes
1answer
110 views

Magento 2 : Add Custom Attribute field to Product Form

I need to add the below field into the product form. Click Here InstallData.php <?php namespace Vendorename\ModuleName\Setup; use Magento\Eav\Setup\EavSetupFactory; use Magento\Framework\Setup\...
0
votes
0answers
12 views

Magento 2 : get product attribute value without loading from repository

Is their any way we can get "over_image" attribute value from product without loading repository ?
2
votes
1answer
117 views

Magento 2 : How to display cms_page custom attribute image in frontend?

After save image is store in pub/media/cms/page/attribute/my_image. And save image name in database cms_page table my custom column. So how to display image in frontend ? Backend image Fronted Image :...
0
votes
0answers
22 views

If trying to get the current product info then pop up model is not opening

/Blockname.php/ <?php namespace Eaglerocket\Customquote\Block; use Magento\Framework\View\Element\Template; class Blockname extends Template { protected $_registry; public function ...
0
votes
0answers
36 views

How to get filterable attribute option after category attribute selection in magento 2 programmatically

I used the below code and list out all the attribute options by current category wise. But, I want to list out available attribute options by selected attribute option with product results. In my case,...
0
votes
2answers
37 views

How to filter product collection in such way where I can use having and addfiledtofilter with AND condition?

I am having product collection where I am getting one custom product attribute called "keep_disabled" and another column which was added on runtime which is sum of quantities 'sum_qty'. I ...
0
votes
2answers
155 views

country_of_manufacture issues with names in Magento 2

I am having issues with country_of_manufacture attribute. I recently made a copy of production site to prep our new server for migration from old server. The issue comes in when I do import testing - ...
0
votes
0answers
27 views

How to Edit Invoice in Magento 2 using programmatically

I want to add colour with the name of product Like - If the product name is Jeans and the selected colour is Blue then I want to print name on invoice is like Blue Jeans in name section. How to do ...
0
votes
1answer
21 views

M2 - Admin related product, grid columns

In Magento 2 you can select your own attributes you want to show on the normal product grid in the admin. But when you are editing a product and want to add some related product, all the attributes ...
0
votes
1answer
53 views

Magento 2 not allowed Superscript(“®”,"™") with product name!

If we have to display product name with superscript tag like "®","™", Magento 2 doesn't support and it display as it is without parsing tag. For example, if we have to display ...
0
votes
0answers
45 views

Adding UPC Attribute to Product Page

I am trying to figure how to add an attribute (UPC) to display just under the SKU on the my product page. I have tried in the past with no such luck. I really need this to work. I have found several ...
1
vote
1answer
87 views

updateAttributes cannot be used to enable a product? (price index not updated)

We are enabling a disabled product with \Magento\Catalog\Model\Product\Action::updateAttributes $this->productAction->updateAttributes([$magentoProductId], [ 'status' => \Magento\Catalog\...
0
votes
0answers
26 views

I want to add "per meter" in specific product pages

I want to sell this product according to length (i.e per meter or feet). I've tried a few extensions but they were not very useful. I just want to add the per meter or per feet feature for user so the ...
0
votes
0answers
11 views

How to clone a product while preserving attribute values set per Storeview?

In a Magento 2.4 store with a single website and several storeviews (i.e. one for each language), I want to duplicate an existing product (Save & Duplicate). This product has some storeview-...
0
votes
1answer
59 views

Magento 2: Observer or Plugin for Mass Update Product Attribute

I have a custom attribute that I need to observe after the mass update product has been finished, this custom attribute is related to a category in another custom table, so if this custom attribute ...
0
votes
1answer
54 views

Magento 2 - Create Product attribute programmatically without InstallData

We need to create a script that creates product attributes. Product attribute comes from third-party API when creating a product its check product attribute available or not If that is not available ...
0
votes
1answer
20 views

Change product attribute type in magento 2

Hope everything is well at all of your end. I am changing type of product attribute. But I am bit confuse after changing type of attribute, it will assigned to all products the same or not. Please ...
0
votes
0answers
32 views

Magento 2 Cannot update specialPrice per website

I'm trying to update specialPrice per website in a Magento 2.3.6 website. The problem is that when i am updating the price using the Product model , the specialPrice is removed from all storeviews ( ...
0
votes
1answer
29 views

Magento 2 : attribute not appearing in product

"tax_class_id" is the attribute i am looking for in product, but i cannot find it. I can confirm the attribute is added in "Default" attribute set & product has also same set ...
0
votes
1answer
21 views

magento 2: how to checked use default value for product status programmtically?

I have to update and checked checkbox for use default field for product status. But I do not know how to update and checked that checkbox ? here is my code $objectManager = \Magento\Framework\App\...
1
vote
1answer
38 views

REST API and custom attributes

My magento installation has 3 stores (domain+language). I would like to update custom attributes for products. When I call GET products/my_test_sku?storeId=1 i get something like the following json: {...
0
votes
0answers
37 views

Customizable options for Virtual Products

I am trying to access the customizable options of a virtual product whose visibility is set to 'Not Visible Individually' through the GQL query, { products(filter: { sku: { eq: "sample_sku"...
0
votes
0answers
17 views

How to add Product Attribute Values from Custom Model Data

I'm building a module for Supplier Inventory. I created a UI Component for creating Suppliers in the dashboard. In my Model\Data I added the Supplier Name. class Supplier extends ...
0
votes
2answers
39 views

Custom product attribute storefront property 'Used for Sorting in Product Listing' is disabled

Stores > Attributes > Product > My Custom Attribute > Storefront Properties tab I'm not able to change the Storefront Properties 'Used for Sorting in Product Listing', since it is ...
0
votes
1answer
50 views

Magento 2: Get all the option label (per store scope) from attribute code

Currently my code is use Magento\Eav\Model\Attribute; use Magento\Eav\Model\AttributeRepository; use Magento\Framework\Api\SearchCriteriaBuilder; $searchCriteria = $this->searchCriteriaBuilder-&...
0
votes
0answers
12 views

How to create my custom visual swatch color attribute in my own module Vendor/Module/Setup/Patch/Data/MyOwnColorAttribute?

I take from https://github.com/magento/magento2/blob/2.3/dev/tests/integration/testsuite/Magento/Swatches/_files/product_visual_swatch_attribute.php like example, but my own color attribute patch didn'...

1
2 3 4 5
36