I’m working on an in-depth ERP project, and ran into a strange problem where I had a reference to a quote object that refused to delete its items. I could run something like this foreach($quote->getItemsCollection() as $item) { if("item meets my criteria") { $quote->deleteItem($item); } } [...]
astorm
Just a quick writeup this time on how I'm using Squid to help debug PHP/Magento issues on an iPad with a non DNS hostname. I'm not exactly breaking new ground here, but I found none of the existing sources everything I needed or wanted
astorm
If you’ve spent anytime doing Magento 1 module development, you’re probably familiar with the _validateControllerClassName method. This method is where Magento 1 generates and validates paths to possible controller class matches during routing. This method is gone in Magento 2 – partially due to the PSR-0 autoloader [...]
astorm
In Magento 1, it was possible to register a global variable with the static registry method. Mage::register('some_var', 'some value'); var_dump(Mage::registry('some_var')); Many extensions, include core Magento extensions, ended up using this from controller action methods to pass variables into the views. While its future is uncertain [...]
astorm
Today we're going to run through a basic "Hello World" example in Magento 2. We'll setup a new URL, and show you how to create a phtml template for that URL. Along the way we're going to be talking about Design Patterns™, design patterns
astorm
The Magento 2 developer documentation is coming along at a good clip. Unlike round one, the company behind Magento has a dedicated team of profesional technology writeres who are cranking out documents based on interviews with the core team, and feedback from the merchant beta. I’ve seem some complaints that the developer [...]
astorm
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
Today we're going to take a break from Magento 2 and talk about using Varnish as a tool for improving the performance and scalability of your Magento 1 system. While Magento 2 is on the mind of anyone connected to the Magento ecosystem, it's
astorm
We're finally here. After our long path through the object manager, automatic constructor dependency injection, class preferences, argument replacement, virtual types, proxy objects and code generation, we're finally familiar enough with the object system to discuss the true replacement for Magento 1's class rewrites
astorm
It's been a long and winding road, but the end is in sight! In this, the penultimate article in our object manager tutorial, we're going to discuss working with instance and non-injectable objects in Magento 2.
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
With their take on an object manager/container and dependency injection, Magento have created a new way for PHP programmers to work. With that new way of working comes a new set of unanticipated challenges. Put another way, new patterns create new problems.
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
Last time we discussed the argument replacement feature of Magento 2's object manager, and introduced the <type/> tag in di.xml. This week we're going to talk about another feature related to argument replacement -- Virtual Types.
astorm
In the last article of our series, we covered the "class preference" feature of Magento's object manager. This week we'll cover a similar, but more selective, class replacement system built into Magento 2. While this article should be accesible as a stand-alone tutorial for
astorm
Today we're going to explore the "class preference" feature of Magento 2's object-manager/dependency-injection system. While this feature is a direct descendant of Magento 1's class rewrite system, it ends up playing a different role in Magento 2. Where Magento 1's class rewrites were aimed
astorm
On a "what they do level", interfaces are pretty simple. Consider the following PHP class
astorm
This week's article is the second in a series discussing Magento 2's object system. Last time we covered the basics of Magento's object manager. This week we're going explain why you'll rarely use Magento's object manager, as well as Magento's implementation of the popular
astorm
Magento 2 brings a slew of changes to the table for an experienced Magento 1 programmer. While you can still see bits and pieces of Magento 1 (EAV, areas, blocks, etc.), the new Magento 2 core team has spent the last few years
astorm