Yearly Archives: 2019
Pure functions have lots of pros. They are predictable, composable, testable and you never have to mock them. Thus, we should try to increase the number of pure methods/functions in our code base, right? So how would you do that? If you have a method with both side-effects and calculations, […]
Magento 2.2.3 I am using PayPal Express and the customer gets a confirmation mail with the following content: We are sorry, an error has occured while generating this content. This is coming from /vendor/magento/module-email/Model/Template/Filter.php if ($this->_appState->getMode() == MagentoFrameworkAppState::MODE_DEVELOPER) { $value = sprintf(__('Error filtering template: %s'), $e->getMessage()); } else { $value […]
I have created an attribute that is used for sorting on the category pages. The sorting order is numeric. Expectation is that sorting order is: 1. 1 2. 2 3. 11 But the actual sort order is: 1. 1 2. 11 3. 2 Apparantly, Magento sorts on the first digit. […]
Default my magento store is loading without index.php. Site is secured. for both there are rewrite rules in .htaccess file which are working fine. I have implemented following code in .htaccess file, this is not working when i am loading the website. but if Load it by appending index.php CORS […]
I’ve been trying to get a special price collection of products for Magento 2 but I keep on failing. I’ve got the following example that works(almost): protected function _getSaleCategoryCollection() { if ($this->_productCollection === null) { /** @var MagentoCatalogModelResourceModelProductCollection $collection */ $collection = $this->_productCollectionFactory->create(); $this->_catalogLayer->prepareProductCollection($collection); $todayStart = $this->_localeDate->date()->setTime(0, 0, 0)->format('Y-m-d H:i:s'); […]
In a shoe store I have the following configuration: For each color we have a configurable product, and in this configurable product we have size variations. We have a size filter … when a customer chooses a size on the filter as it is today, all simple products are looped […]
I am looking for a solution to mitigating 2 days of downtime. I reached out to network solutions and they do not have control over the TTL of the Name Server records (which is 2 days or 172800 seconds). Current Strategy Planned Migration Steps : Migrate Name server – First […]
I’m trying to create an ISO image containing several directories and files. The directory structure I’m trying to create in the ISO image is NOT the same as what is currently on my hard drive. This process will be done by another script, so it must be done with the […]