2 votes
Accepted

How to delete empty attribute values in Magento 2

Okay, I figured it out. I couldn't find a single SQL command to do everything but this is the process I used to fix this. go to the eav_attribute table of your database and find the attribute_id of ...
matthh's user avatar
  • 33
1 vote
Accepted

Magento 2.4: Programmatically add an attribute from the default set to a custom attribute

I'm just wondering if there is a best practice for inheritance of particular attributes, where I don't want to just use a skeletonId and inherit all of another set's attributes. I’ll preface by ...
fantasticrice's user avatar
1 vote

Difference between Extension Attributes and Custom Attributes magento 2

Extension Attributes and Custom Attributes are used to extend the functionality of Magento 2, but they serve slightly different purposes. Extension Attributes are used to add additional fields to an ...
Harsh Darji's user avatar
1 vote

Get possible sizes of product on product page in Magento 2

Based on Jitendra Patel's answer, this is the actual code for Magento 2. $sizes = array(); if ($product->getTypeId() == \Magento\ConfigurableProduct\Model\Product\Type\Configurable::TYPE_CODE) {...
Teun K's user avatar
  • 23
1 vote

Get possible sizes of product on product page in Magento 2

You can check the below code to get all the sizes of a configurable product. $sizes = array(); if($_product->isConfigurable()){ $allProducts = $_product->getTypeInstance(true)-&...
Jitendra Patel's user avatar
1 vote
Accepted

Is it possible to get a collection containing the attributes of all entities (customers, products, etc)?

Think you can use Mage::getResourceModel('eav/entity_attribute_collection')
sv3n's user avatar
  • 11.6k
1 vote
Accepted

Custom attribute not present in getProduct()

Make sure when you add your custom product attribute, you have to add the visible_on_front property with value true, eg: $eavSetup->addAttribute( Product::ENTITY, 'sample', [ ......
Tu Van's user avatar
  • 6,118
1 vote

How to add svg icons to Swatch attribute (disable admin panel file validation)?

By default, Magento does not allow SVG file uploads for security reasons. I strongly recommend against enabling SVG uploads for security purposes. However, if you still wish to enable SVG uploads, you ...
Mohammad Bharmal's user avatar
1 vote

Is it possible to change product attribute type in magento 2?

Please use patch file instead of UpgradeData.php I convert my attribute to price input type app/code/Vendorname/ModuleName/Setup/Patch/Data UpdateProductAttribute.php <?php namespace Vendorname\...
Msquare's user avatar
  • 7,935
1 vote

"discount_tax_compensation_amount" attribute in Sales Order Item (Magento 2)

Example Full price of item, with tax included: $100 VAT at: 20% Discount of 10% applied on item price-excluding taxes: Valid Calculations Full price of the item without taxes is: $100 / 1.2 = $83....
Bhavesh Prajapati's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible