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, […]
Blog
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 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 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 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 […]
https://codeberg.org does not load (however, I am able to ping codeberg.org, and on curl, I am able to get a response from http://codeberg.org) Firefox says: An error occurred during a connection to codeberg.org. SSL received a record that exceeded the maximum permissible length. Curl says: ~ ❱ curl -v --user-agent […]