Start experimenting with ten mental models you can use to get unstuck, look at difficult problems from new angles, verify your assumptions, and understand systems more deeply. How do you quickly recover when you’re stuck in a rut? Naturally, you could sit down and brainstorm solutions. Unfortunately, it may take […]
Daily Archives: February 17, 2022
In Magento 2.4.2, when i am going to update products programmatically, it’s removed customizable options automatically Below code for your reference: $objectManager = MagentoFrameworkAppObjectManager::getInstance(); $productCollection = $objectManager->create('MagentoCatalogModelResourceModelProductCollection'); $collection = $productCollection->addAttributeToSelect('*')->load(); foreach ($collection as $product){ $product->save(); } It’s automatically removed existing customizable options Before executing above code After executing above code
Use Case From a product with quantity 0 and Out of stock status. I have an event <event name="catalog_product_save_after"> <observer name="stock_alert" instance="CpyStockAlertObserverSaveProduct" /> </event> Change the value adding quantity and setting in stock status When I check the product saleable value in the observer public function execute(Observer $observer) { $product […]
I need to know, Is there any side issues, if we increase the below path size more than max in config file. system/security/max_session_size generally as per magento max size is 256000 Can we increase more then 256000 until which limit can we extend the size. Anyone who know ever used […]
I’m using the module Amasty’s customer Attributes to create custom customer attributes, I like to get custom attribute displayed value but i got the option value. I like to get the value in data-title attribute I tried this if ($customAttribute = $customer->getCustomAttribute('custom_value')){ $regrouper = $customAttribute->getValue(); var_dump(regrouper);exit; //it returns 615 instead […]
How to setup bento survey in Magento 2 ? Need to add below in head tag. <bento-survey-form id="old-glade-12345" type="popup" delay="5"></bento-survey-form> I have tried using requirejs-config.js and also adding below script. <script src="https://unpkg.com/jquery"></script> <script src="https://unpkg.com/survey-jquery@1.9.13/survey.jquery.min.js"></script> requirejs-config.js var config = { paths: { Survey: 'V4U_BentoSurvey/js/survey.jquery.min' }, shim: { Survey: { deps: ['jquery'] […]
Given an array arr[] of N integers. Arrange the array in a way such that the minimum distance among all pairs of same elements is… Read More The post Maximise distance by rearranging all duplicates at same distance in given Array appeared first on GeeksforGeeks.
Given an integer N, the task is to print a permutation of numbers from 0 to N-1, such that: There is no duplicate element in… Read More The post Generate a permutation of [0, N-1] with maximum adjacent XOR which is minimum among other permutations appeared first on GeeksforGeeks.
Given an array height[] which represents the height of N people standing in a line. A person i can see a person j if height[j]… Read More The post Maximum people a person can see while standing in a line in both direction appeared first on GeeksforGeeks.