I’m trying to get product collection with multiple skus filter, don’t know what I’m missing or doing wrong: $objectManager = MagentoFrameworkAppObjectManager::getInstance(); $productCollectionFactory = $objectManager->create('MagentoCatalogModelResourceModelProductCollectionFactory'); $collection = $productCollectionFactory->create(); $collection->addAttributeToSelect(['name','sku']); $collection->addAttributeToFilter('sku', ['in' => ['IS-OB-2165','TM-VIVO-Y15']]); $collection->setPageSize(3); foreach ($collection as $product) { print_r($product->getName()); }
Magento
I want to add using the /rest/V1/shipment/track API. My shipment. We work with 3 shippers: DHL UPS PostNL. Now I need to know the carrier_code in order to add the correct information for the tracking link to work. However, I’ve googled for a long time and found no such thing […]
We have added <?xml version="1.0"?> <csp_whitelist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Csp:etc/csp_whitelist.xsd"> <policies> <policy id="style-src"> <values> <value id="typekit" type="host">*.typekit.net</value> </values> </policy> </policies> </csp_whitelist> to the etc/csp_whitelist.xml of a module within app/code/, in order to allow externally included fonts via TypeKit on the site. However, the resulting content-security-policy-report-only response header does not contain style-src at […]
while creating the new products its throwing below error “Warning: Invalid argument supplied for foreach() in home/……/public_html/vendor/magento/module-media-storage/Model/File/Validator/NotProtectedExtension.php on line 84” same issue with import option also. protected function _initProtectedFileExtensions() { if (!$this->_protectedFileExtensions) { $extensions = $this->getProtectedFileExtensions(); if (is_string($extensions)) { $extensions = explode(',', $extensions); } foreach ($extensions as &$ext) { $ext […]
I am new to next js and bigcommerce , I am trying to create a custom provider for Magento and try to connect it. can you please tell, how I achieve this?
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 copy of catalog_product_view.xml to also display my “ingredients” attribute, this works perfectly because the attribute type […]
All i’m trying to do is change the word “comment” on the email confirmation email. Thought there might have been a comments phtml in vendor/magento_sales but there is not.
I try to add configurable options in a custom modal page (quick view). But when I open that modal I have the following error: Error: cannot call methods on priceBox prior to initialization and the configurable options dropdown is empty: this is my custom – form.phtml <div class="product-add-form"> <form action="<?php […]
We have enabled Backorder for all simple products. And created configurable items with color swatches. Now I need to hide some swatches which has negative quantity. To do this we need to add quantity to the below div. <div class="swatch-option color" id="option-label-color-93-item-28" index="1" aria-checked="false" aria-describedby="option-label-color-93" tabindex="0" data-option-type="1" data-option-id="28" data-option-label="Blue" aria-label="Blue" […]