I am getting following error but not sure how to debug. Please guide. Warning: foreach() argument must be of type array|object, null given in app/code/XYZ/ElasticSmile/Model/Product/Indexer/Fulltext/Datasource/CatalogExtra.php on line 494 Here the function is foreach ($product->getExtensionAttributes()->getConfigurableProductOptions() as $option) { $attributeCode = $option['product_attribute']->getAttributeCode(); $options[$attributeCode] = $child->getData($attributeCode); //If you want to display swatch image, […]
Monthly Archives: June 2026
I have to update and checked checkbox for use default field for product status. But I do not know how to update and checked that checkbox ? here is my code $objectManager = MagentoFrameworkAppObjectManager::getInstance(); $productId = 1; $status = 1; $store = 1; $product = $objectManager->create('MagentoCatalogModelProduct')->load($productId); try { $product->setStoreId($store); $product->setStatus($status); […]
I’m trying to add a custom attribute to the customer_entity table and then sort the collection with that custom attribute. So far I’ve tried using etc/db_schema.xml to add a column to the table, and even though the column got added to the table, $collection->addAttributeToFilter('my_custom_attribute', '1') returned ‘attribute ‘my_custom_attribute’ is invalid’. […]
We are unable to set PHPSESSID secure and set sameSite value to Strict, does anyone have any idea how we can set this in Magento 2 EE. Thanks
I want to increase the percentage (%) match of search term so that the most relevant matching product will show on top. From where should I do that? I tried finding it in Smile Elastic Suite setting but didn’t get it.
I want to customize the appearance of all non-printable characters (spaces, tabs, end-of-line markers, etc.) in VS Code. Rather than assigning fixed colors, I’d like their foreground and background colors to automatically follow or be based on the active theme’s foreground and background colors. Actually, I want the non-printable characters […]
I am trying to remap the default keyboard shortcuts for moving tab positions in Firefox on macOS. Currently, the default behavior is Ctrl + Shift + Page Up/Down. I find this combination uncomfortable and would like to change it to Shift + Option + Command + [ / ]. I […]
I have an HP 15s-fq0xxx laptop with Windows 11. Task Manager shows high CPU / memory usage (upper than 80%), and I experience slow applications response times. I reset the computer to factory default, reset MS Defender (MpCmdRun.exe -ResetPlatform), and followed the instructions in this page Clean Boot but no […]
I am working on Windows Server 2016 Standard. Only after a while (weird), ALT-TAB starts to switch my keyboard language (to Hebrew), in addition to switching windows, seemingly only for my typing within the Mathematica Notebook environment. Very frustrating. Suggestions? Thanx.