Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

New answers tagged

0

Checking the system log, I was hitting into this error: [2019-05-27 04:12:12] main.WARNING: Attempt to load value of nonexistent EAV attribute '180' for entity type 'Magento\Catalog\Api\Data\ProductInterface'. [] [] Google-d this error and a whole bunch of unsolved problems showed up. It seems that many users are hitting into this ...


0

First make sure to assign the "Brand Name" attribute to all the attribute sets in your system. Afterwards, go to the products grid in the admin, click "Actions -> Update Attributes". You should be able to update the value of your attribute.


0

If you follow Abhishek Panchal answer above even-then your custom attribute value noe displaying on category pages the confirm you had not enabled this attribute for catalog pages: edit the attribute select: storefront properties -> Used in Product Listing -> yes


0

$product->getTypeInstance()->getConfigurableAttributes($product); You might want to add some checks, in case the product you are supplying isn't configurable. \Magento\ConfigurableProduct\Model\Product\Type\Configurable::getConfigurableAttributes is only available there.


0

you can make Magento\Catalog\Api\ProductAttributeManagementInterface $attributeSetId = 20;//your_attributeSetId $productAttributesManagement = $this->objectManager->create('Magento\Catalog\Api\ProductAttributeManagementInterface'); $productAttributes = $productAttributesManagement->getAttributes($attributeSetId); Please note that you should not be ...


1

You appear to doing a category product collection. Can you not use something like this? public function __construct( \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory, array $data = [] ){ $this->productCollectionFactory = $productCollectionFactory; parent::__construct(...


0

If you want to filter a collection on store-specific values (which seems to be the matter in your case), you should either use setStoreId() to make the collection aware of which store this collection applies to: $productCollection ->setStoreId(int|string|\Magento\Store\Api\Data\StoreInterface $storeId); You can also filter a collection on a store, ...


0

Open your attribute by Catalog->Attributes->Manage Attributes->Open color attribute Set category "Is Anchor" to yes From Catalog->Manage Categories->Edit Category->Go to tab Display Settings-> Set Is Anchor to Yes


0

Достанем все swatch из атрибута $brand_code="manufacturer"; $brandValue = $objectManager->get('Magento\Catalog\Model\Product')->load($_product->getId())->getData($brand_code); $swatchHelper=$objectManager->get("Magento\Swatches\Helper\Data"); $swatchData = $swatchHelper->getSwatchesByOptionsId([$brandValue]); Выводим картинку: <img ...


1

This is not a bug. It's a feature. The default values serves as "default" from now on. It is not added to products existing prior to setting this default value. If you create a new product, you should see the "yes" value selected. There is no "out of the box" way of setting the default value to existing products.


0

You need to enable Free Shipping Promotions from Webshopapps Matrix Rates extension's system configuration. Please check below links for more information: http://support.webshopapps.com/matrixrate/free-shipping-promotions/ http://support.webshopapps.com/premium/creating-free-shipping-promotions/ Hope this will help you.


0

Found the solution. The correct way to get the label is getResource()->getAttribute('attr')->getStoreLabel();


1

To get your custom attribute value in Magento/CatalogInventory/Model/StockStateProvider.php model file you just need to do following steps. Override Model file in custom module Mee/CustomModule/Model/StockStateProvider.php as mentioned in below link https://magenticians.com/override-model-magento-2/ Include your function in the above overdid model file as ...


1

I have attached screenshots of Product attributes with default attribute sets.


-1

If I read your question correctly, you want to organize your products to only require specific attributes. If so then you can use Attribute Sets to create attribute templates for your products. When you create a new product, you can define the attribute set so the product only uses that subset of attributes. See: https://amasty.com/blog/beginners-guide-on-...


Top 50 recent answers are included