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 ...
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 ...
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 ...
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) {...
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)-&...
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')
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',
[
......
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 ...
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\...
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....
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
attributes × 2267magento2 × 677
magento-1.9 × 459
product-attribute × 342
product × 257
layered-navigation × 120
configurable-product × 118
filter × 102
customer × 101
custom-attributes × 101
category × 91
attribute-set × 91
eav × 88
magento-1.7 × 87
collection × 87
database × 81
magento-2.1 × 71
php × 63
magento2.3 × 62
magento-1 × 60
magento-1.8 × 55
admin × 54
custom × 53
dropdown-attribute × 52
customer-attribute × 44