Category: Programming Quickies
Back in they day, I ran a Tumblr blog named Magento Quickies where I’d post shorter, less in-depth posts about my travels through Magento’s source code. This Programming Quickies categories is the successor to that Tumblr blog. You’ll find all the old Magento Quickies content here, as well as new short posts about programming in general.
This section has its own RSS feed, the old Magento Quickies feed should should be redirecting, and we’re cross posting notifications for new posts over to magento-quickies.tumblr.com. In other words, you shouldn’t need to know any of this, but the duct tape that keeps the internet held together isn’t aging well, so your mileage may vary.
Below you'll find all the Programming Quickies articles on the site,
followed by a chronological listing of the same.
You may also browse the
7
series directly via the following links.
Pestle, Four Steps to Async Iterators, Checking in on OpenMage and Magento in 2020, Text Encoding and Unicode, Shopware's Development Environment, A Sentimental Gen-X Programmer Culls his Tech Books, and, Containers, Containers, Containers.
Every so often in my small Magento 2 experiments, I’ll hit a point where an error like this starts popping up. Fatal error: Cannot redeclare class PulsetormHelloworldObserversBlock in /path/to/magento/app/code/Pulsestorm/Helloworld/Observers/Block.php on line 4 I’ll scratch my head for a while, wonder what’s going on, [...]
astorm
Debugging Varnish VCL configuration files | Midwestern Mac, LLC Over the past few years varnish has become the “go to” way for Magento systems to paper over serious backend performance problems – which means varnish debugging is quickly becoming a must have skill for Magento developers working at all levels of [...]
astorm
Magento 2: How to Check if a Module’s Installed Hint: Inject Magento’s Magento/Framework/Module/Manager object.
astorm
Magento Patches Finder Nice and simple web application that will let you say Hey, I’m using THIS version of Magento CE and the application will say back Then here’s the security patches you want It’s a pity that the politics of a company in transition don’t let Varien/Magento Inc./Ebay Enterprises/etc. release [...]
astorm
AOEpeople/MageTestStand This tool is used to build a minimal Magento environment that allows to run PHPUnit tests for a Magento module on Travis CI.
astorm
clockworkgeek/MagentoTagToConnect Clever bit of programming from clockworkgeek (Daniel Deady) that lets you turn any Magento project with a composer.json file into a Magento Connect package.
astorm
Where Magento Connect does Check for Permissions Magento Connect, File Permissions, and myself have a rocky, inconsistent relationship. This one’s the opposite of my usual complaints – if Connect’s saying it can’t install itself due to file file permissions errors, here’s where to check which directories it [...]
astorm
Magento Sellers Guide to Sales Tax A relatively straight forward article about how to collect sales tax for an ecommerce business. It’s remarkable how much hand waving there is about this from agencies representing themselves as ecommerce experts.
astorm
If Magento 2 is your first introduction to PHP namespaces, here’s one small thought technology that might help. Consider the following namespace FooBaz; class Bar { } The above does not define a class named Bar. It defines a class named “FooBazBar”. That’s how PHP sees the class internally, and once you start [...]
astorm
If you’re trying to use the browser setup workflow in the Magento 2 beta released in December of 2014, make sure your web server is using the index.php in the root of the project and not the pub/index.php file. It’s unclear which index.php is “the right” file to point to – the pub folder seems to be an [...]
astorm
If you’re using Vagrant to manage your Magento 2 installations, you’ll want to be careful with file permissions. By default, it appears that Vagrant’s synced folder setup won’t allow the apache/web user to create folders with permissions elevated higher than the default sync share. Dropping in some custom mount [...]
astorm
Magento 2 Profiler There’s still a lot of work to be done before Magento 2 is ready for general release, and a lot of that work will involve performance tuning. The old UI for enabling/disabling the built in profiler is gone, but this Stack Exchange answer from Marko Martinović tells you how to enable it. (a MAGE_PROFILER server [...]
astorm
Two Vagrant boxes for the newly released Magento 2 beta. The first is maintained by Rolando Granadino (beeplogic to Twitter folks), and is a fully featured opinionated box, with puppet provisioning, web grind for xDebug profiling, and git submodules for project dependencies. The second is a lightweight affair from Alan Kent, Magento [...]
astorm
Configuration Gaslighting Checklist A quick Stack Overflow answer from yours truly that covers what to do when you think Magento’s gaslighting you on configuration values you’re sure you’ve changed.
astorm
I needed to grab a few category names when all I had were the category IDs $categories = Mage::getModel('catalog/category')->getCollection() ->addAttributeToSelect('name') ->addFieldToFilter('category_id', array('in'=>$product['category_ids'])); Can you spot the error? PHP complained with the following error Fatal error: Call [...]
astorm
In a stock Magento system, there’s several tables where a row will have an ID field of 0. mysql> select * from core_storeG: *************************** 1. row *************************** store_id: 0 code: admin website_id: 0 group_id: 0 name: Admin sort_order: 0 is_active: 1 *************************** 2. row [...]
astorm
If you’re new to Magento, you may not realize that every remote API method has a native PHP equivalent. The why, how, and how to identify these models is covered elsewhere, but one thing I forget at my peril is how useful the API methods are when I need to serialize something as JSON or via PHP’s serialize function. [...]
astorm
Can’t Log into the Admin Roundup Stack Exchange answer where I (attempt to?) list every possible reason the Magento Admin might not set a session cookie, creating the dreaded “can’t log into the admin” error.
astorm
Anti-SQL Bias Developers coming into Magento are often put off by seemingly voodoo rituals like “Don’t directly manipulate the database tables with SQL”. This may be a ritual, but it’s a smart one, and my answer to this questions tells you why. It also includes an example SQL query for fetching all the product [...]
astorm
I can’t login to Magento Admin Another misconfiguration that can make it impossible for developers to log into the Magento admin.
astorm