Questions tagged [product-attribute]

Questions about creating, managing and using product attributes

Filter by
Sorted by
Tagged with
0
votes
0answers
12 views

Magento 2 Sort Text swach options by alphanumeric

Magento 2.3.3 We need to sort the config product options by alphanumeric.We do not need to adjust the sort order manually from Admin. I have already used this solution but not working for me
1
vote
1answer
33 views

How to get the product type by the product SKU?

I have some product SKUs in my custom module and I want to get just the simple products. I don't want to load each product entity by SKU in a loop to get the product type to avoid performance issues. ...
0
votes
0answers
15 views

Magento 2 - Add text swatch attribute value programmatically

i need to add text swatch attribute value through script. I'am able to add the attribute but swatch value is not adding. Below is the code i using - $attributeDetails = $objectManager->create(...
0
votes
1answer
12 views

Why my bundle products return a different SKU?

I'm getting the SKU from my Bundle product and the products associated too, but the result bellow showed up. Bundle Product SKU: BundleQA-GT-5AHG30008P Simple Product SKU: GT-5AHG30008P It's ...
0
votes
2answers
30 views

Magento 2 get product attribute value without objectManager

I load some related products inside a foreach and want to call some attribute values of these individual products. My current code below works fine with using $objectManager, but that's not the best ...
1
vote
0answers
16 views

Magento 2 How to pass collection of custom attribute using multiselect options from block

In list.phtml I am fetching newly created block's function. like e.g. $blockObj= $block->getLayout()->createBlock('Custom\Module\Block\Entree'); $dataget = $blockObj->getProductdata($...
2
votes
1answer
19 views

Create drop-down product attribute for frontend

How to create an drop-down product attribute for frontend programmatically .
1
vote
0answers
23 views

Save product-attribute value

How to save attribute value into DB from a phtml ? ie, Phtml contains a custom input field which is rendered in the admin product edit page under a custom tab. The value entered in the input field ...
0
votes
0answers
20 views

Magento2 - Attribute save before event for mass update

I need to modify some custom attributes on mass update of products. Now magento schedules the attribute save and runs the process in background and the event catalog_product_attribute_update_before ...
0
votes
0answers
19 views

Create CRUD operations for a specific product attribute

Is it possible to create a CRUD operations just for a particular product attribute options . Say in the above Screenshot, I have generated some output in the product edit page using phtml . I need to ...
0
votes
0answers
30 views

Magneto 2 : remove attribute from particular configurable product programmatically

ex. I have a configurable product id X having attributes like color, size, material,A,B,C etc. and I want to remove attribute C from the product X. and also remove from every linked products with X. ...
1
vote
1answer
38 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 ...
1
vote
1answer
19 views

Images URL is getting broken at frontend in mobile view

I created custom attribute with name Product Header Info and added the following content in the text editor: I am getting broken URL at frontend.When I am inspecting the image it is showing something ...
0
votes
1answer
27 views

What is difference between creating custom attribute programmatically and via admin in magento 2?

Creating an attribute in the back end is easy, then why to create it as programmatically? I like to know what is the difference between these two.
1
vote
0answers
17 views

Custom products attributes stopped updating from dashboard or programmatically

So, on this Magento 1 instance, everything worked fine until a couple of months ago. I have approx 20 custom attributes attached to an attribute set for a Product. Two of them are not saving. If ...
0
votes
0answers
15 views

How do I append an attribute field to the V1/products/attributes API call

When creating a product attribute, I have a custom property that can be assigned; it's stored as api_attribute_id. When making GET API calls to V1/products/attributes, I'd like for this data to be ...
0
votes
0answers
14 views

Product attribute multi-select saves but has no selection in edit

I have a product attribute with about 200 possible select options. For some products it saves perfectly and when i enter edit product again, it shows the selected options.. but for a few products (100 ...
1
vote
0answers
22 views

Disable a dropdown based on Date attribute

I have created a 2 date attribute which is Date_from and Date_to via back-end. Admin can add these dates and related time slots in another drop-down attribute which is choose_date. In the frontend, ...
0
votes
1answer
36 views

Get attribute value in magento2

I am using an object manager to get the attribute value even though it's not recommended. I am getting NULL in product-object which causing error "GetattributeText() on NULL". Below is the code that ...
0
votes
0answers
28 views

Magento 2 : update product custom attribute value (type: date) in specific product programatically

I want to update product custom attribute value in specific product which is type date programatically can anyone suggest how to update. I trying below but not success. $date = 31/03/2020; (string) $...
0
votes
1answer
39 views

Magento 2: Checkout order summary show custom product attribute failed to load component issue

I'm trying to show custom product attribute in checkout order summary section. I have achieved this by override vendor/magento/module-checkout/view/frontend/web/js/view/summary/item/details.js and ...
0
votes
1answer
28 views

Where and how is stored the value of “Use default value” checkboxes in Magento 2 database?

On my Magento 2 website, I have multiple stores. On the product page of each store, description is not shown because it's defined globally and each product has the "Use default value" checkbox ...
2
votes
1answer
29 views

How to update product attribute with different values in magento 2?

I've created custom product attribute which is set on catalog_product_save_before event. Now i want to update value (i have two options of this value) of this attribute for all product, depends on few ...
1
vote
0answers
46 views

Magento 2 : Add new Product attribute options

I have added a product attribute programmatically. so in store->product->attribute it shows option values readonly. Is it possible to add new option from admin side ? Ex. because it is system ...
0
votes
1answer
10 views

how to het customer pick date for electron product, example, amusement park ticket

I'm trying to sell tickets electronically. Consider like an amusement park, or parking lot tickets. No worries about assigned seats or limited dates / times. I can handle checking if it is sold out, ...
0
votes
1answer
33 views

How to remove custom product attributes on module disable?

I added 2 custom product attributes with the help of setup/InstallSchema.php in my Magento 2 custom module. It's working fine. But, I can't remove these Product attributes on module disable from the ...
1
vote
2answers
27 views

Magento 1 : Change multiselect product attribute to mutliple checkbox attribute

I need to change the multi-select attributes in the admin product edit form to multiple checkbox attributes. Is this possible?
0
votes
0answers
7 views

M2.3.3 : 500 on product creation page after adding attribute programatically

I am adding product attribute programmatically the following way: use Magento\Framework\App\Bootstrap; require '/www/public_html/app/bootstrap.php'; $params = $_SERVER; $bootstrap = Bootstrap::create(...
0
votes
0answers
12 views

Magento 2 Layered Navigation - Multiple Select Attributes, Filter on All Selections

I have layered navigation enabled with a multiple select field, but am having difficulties with the default behavior of every extension out there that I can find. Need to find a way for the user, ...
0
votes
0answers
16 views

Magento2: Media image type attribue not visible in product add/edit section

I have created a Media image type product attribute section and assign this attribute in default attribute set. But attribute not visible in product add/edit section. Attribute created: Assigned in ...
0
votes
1answer
34 views

Attribute Set to much load in product page admin side in magento 2.3.3!

I have Magento site in 2.3.3 version, I have created the attribute set in the admin side using the default Magento attribute set option. - https://prnt.sc/qs3wiq on my site like 100000+ products with ...
0
votes
0answers
41 views

How to display layered navigation with attribute values in the custom CMS page in Magento 2?

I am using Magento 2.3.1 I have one product attribute named "Test". I have set values for this attribute in all products and this attribute is set as a filterable attribute in the layered navigation. ...
0
votes
0answers
15 views

Magento 2 Product custom attributes are not in created order

In my admin dashboard product Add/Edit page I have my custom attribute order like below image. Admin Page But in my product view page i get in random order like below.
0
votes
0answers
16 views

Limit Quantity For the Products With Specific Attribute Magento2

Trying to Limit all the products with having a specific attribute (Yes/No) and others will behave normal. I have used the event in my module my event.xml <event name="...
0
votes
0answers
17 views

Magento2: Configurable product attribute issue

I have created a configurable product using Size attribute(Text swatch type). When I create a configurable product some size also assigned to the parent configurable product automatically So even I ...
0
votes
1answer
19 views

setData does not set attributes values

I am creating simple products and try to set some attribute values $attributeSetId = $product->getDefaultAttributeSetId(); $product->setSku($sku); // Set your sku here $product->setName($...
0
votes
0answers
15 views

Custom eav attribute not exporting on product

New to Magento, I'm using the core magento 2 module-catalog-import-export in order to export my products into a CSV file. Based on this URL pattern : https://mysite/admin/admin/export/index/key/...
1
vote
0answers
14 views

Adding new input fileds for attributes in a specific attribute group - Magento 2.3

I created a new attribute group 'Features' in the products section. I need to create two new fields (checkbox and text field) apart from the available option for attributes inside the group 'Features'....
0
votes
1answer
33 views

Get available quantity in Magento 2.3 for CSV export

I can't find a way to get the available quantity in Magento 2. I am Building a file to export products to CSV. Quantity must be stored in 'quantity_and_stock_status' but how to extract it I don't know....
1
vote
0answers
21 views

How to display product attribute set in product list page via custom module in magento 2.3.3?

I am trying show product Attribute set in product listing page.I want to achieve via custom module. can someone help to achieve this solution? Thanks in advance.
0
votes
1answer
59 views

Magento 2.3 Natural Sort Order for Numeric Attributes / Sort Order Wrong

I have a custom attribute (text field) - let's call it "size". It contains numeric values like 1,2,3,10,20,30. Products are sorted by this attribute on the category page. Expected sort order: 1,2,...
0
votes
0answers
28 views

Modifying custom attribute programmatically

I'm trying to build a program to manipulate some data in the backend without us doing it manually via admin. So when changing data for the attribute group_price I'm doing this: $product->...
1
vote
0answers
21 views

Adding date_created to catalog/product admin grid

I want to add the date on which a product was created to the default product admin grid. I've created a module under app\code\Vendor\Module with: ./etc/module.xml <?xml version="1.0" encoding=...
0
votes
0answers
20 views

How do I get the value of a property in my product on my phtml file?

Im looking at my theme/Magento_Catalog/templates/product/price/final_price.phtml and I am trying to set up a conditional so that when a custom field that another developer built in as a dropdown is ==...
1
vote
1answer
37 views

getProduct gives repeated product on cart page as additional info instead current product

I have developed a custom module to show additional product info on cart page. My module is combo of: https://webkul.com/blog/add-product-information-checkout-cart-in-magento2/ (https://github.com/...
0
votes
1answer
46 views

Magento 2 how to create link_title column for the table catalog_product_link

How to create column called link_title to the catalog_product_link table & what are the steps, need to be followed to set the value to the respected column Did small prototype as followed here ...
3
votes
5answers
233 views

Magento 2 : How to show/Hide custom tab on product detail page based on product attribute?

I have created a product attribute like, display_custom_tab, if it is yes then show custom tab on product detail page, otherwise do not show tab. can anyone please tell me how to write condition in ...
3
votes
3answers
154 views

Magento 2 What is the use of 'apply_to' to add product attribute?

I have seen one option 'apply_to' while adding an product attribute. ex. $eavSetup->addAttribute( \Magento\Catalog\Model\Product::ENTITY, 'sample_attribute', [ ...
0
votes
2answers
42 views

check visibilty of specific product

I want to select a value for status or visibility on a specific product for which I have only the sku. I have tried many ways but did not arrive a a solution to the problem. Anyone can help me, ...
0
votes
2answers
53 views

Magento 2 :- How to add product on CMS page

I want to add product url as button for product programmatically. After clicking it should process for purchasing process. I want to add it on CMS or any custom page.(exactly how we can add it through ...

1 2 3 4 5 33