Summer of Louie

Recently our friend Jesse set out on a cross country bike ride to raise awareness and funds for the impoverished women of Korah, Ethiopia (read more here). When our Brand Ambassador, Louie the Llama, heard about all of the amazing places Jesse was going to visit along the way, it inspired him to have his own summer adventure.

Turns out, Louie is a pretty popular guy (or, um… llama), and he’s made friends from all over the world. Throughout the summer he’s going to have the opportunity to visit many of them. He is looking forward to seeing new places, but equally as excited to meet a lot of people, eat new foods and spread his love of bow ties around the world.

Louie is starting out in his hometown of Springfield, MO on Memorial Weekend, then ending the trip back in Springfield on Labor Day. The in-between is a global adventure of epic proportions. Have any travel tips for Louie? Comment below!

Louie will be sending us photos and stories of his adventures as he travels, follow along on Facebook and Twitter.

Have a great summer!

Things You Already Know About Magento 2

Magento mastery… You’ve worked hard for it. Your Magento accomplishments have been hard-fought through blood, sweat, and tears. Okay, maybe not blood, but almost certainly some sweat and tears.

Enter Magento 2. You’ve heard about all the great new features: a new marketplace for extensions, new deployment processes, and more dependency-injection than you can shake a stick at. Just like that, your so-called “mastery of Magento” is gone, right? WRONG. Magento 2 introduces some great new elements, but all of the things that made Magento 1 great are still around.

There are plenty of articles out there highlighting what’s new in Magento 2, but I’d like to examine what’s old.
These are the reasons you’re still a Magento master.

Now take a deep breath and let that apprehension over Magento 2 melt away. The more things change, the more they stay the same…

Module Architecture

A quick look at the modules in vendor/Magento will tell you that all the familiar module components from Magento 1 are still there. Some of them work a little bit differently, but their roles are the same. Also, note that many of the additions are components you’re familiar with that have been moved from other areas in the Magento file structure into the module directories. For instance, translations located in app/locale in M1 are now in i18n. Module-specific items previously located in app/design and skin are now located within the module’s view directory.

Module Architecture: M1 vs M2

Block

Blocks have changed so little that you can pretty much use them the way you always have. All your favorite methods like beforeToHtml, afterToHtml, and _prepareLayout are present. There are equivalents for M1’s abstract and template block classes (located in vendor/magento/framework/View/Element).

Controller

Controllers serve the same purpose you’re used to, but M2 has simplified their structure. Instead of multiple actions on a single controller (such as a customer account controller with login, logout, dashboard, etc.) every action has its own controller. You implement the method “execute” on the controller to perform what would have been in the action method in M1.

Magento 2 Product View Controller

etc

If you love xml-based configuration, Magento 2 delivers. The big difference here is that the configuration you’re used to has been divided into more files. For example, instead of having event and cron sections in config.xml, these pieces of configuration have been moved into events.xml and crontab.xml. Global, frontend, and admin nodes in a single file have also been replaced with separate directories. For example, in the catalog module observers in etc/events.xml will function in admin and frontend while etc/frontend/events.xml will only apply to the frontend.

Magento 2 etc

Helper

No special caveats here. M2 helpers work exactly as you’d expect.

Model

Models are very similar to M1. There are models, which represent individual entity instances (such as a particular product), and resource models (including collections) which perform the actual database interactions. When accessing models within your module there won’t be much difference from M1. Accessing models in other modules (such as loading products within your custom module) have some caveats related to the new service layer (the module’s API directory – see Advantages of Service Contracts). However, even these new elements are somewhat reminiscent of models and collections in the way they represent data.

Magento 2 Model and Api directories

It’s also worth mentioning that observers and cron tasks are no longer grouped with models. They each have their own directory in the module.

sql / Setup

In M1 modules contain install and upgrade scripts that are triggered by a discrepancy between the module version (in etc/config.xml) and the module’s record in the core_resource table. This is similar to M2, but the system has been simplified. There are generally fewer files and you don’t have to name them according to the version numbers that apply.

Magento 2 catalog setup

Extensibility

Extensibility has always been a huge focus of Magento, and M2 offers even more options for elegantly modifying how the application runs and appears to the user. However, the M1 concepts are still present and play a big role tailoring your installation to suit your needs.

Frontend Fallback

Magento has always relied on theme fallback to provide presentation flexibility. Files found in your theme will be used. Files that aren’t found will be retrieved from its parent theme. This is the same in M2.

Observers

Throughout the Magento application events are deliberately dispatched to allow interference from other modules. This remains unchanged in M2, and it’s still the best place to make a change to behavior if needed. Observers are now located in their own directory (instead of Model) and, just as M2 controllers have one class per action, observers have one class per event with an “execute” method to be run in response to the event.

Rewrites / Preferences

If observers fail to provide the necessary access in M1, rewrites are the go-to solution to modify a class’s behavior. While it’s important to mention that M2’s plugin functionality would be the next best thing after observers, the concept of a rewrite is still around. The closest thing in M2 is a preference, and it’s related to the dependency injection system. Like an M1 rewrite, it allows you to swap instances of native classes with your own so you can override methods and properties on the class.

Rendering System

If you love M1’s xml-based layout system (and I do), M2 layout doesn’t disappoint. It’s conceptually the same, but the organization is just a little different. Comparing the two makes M1 seem a little free-form. M2 takes a more structured approach to layout. For starters, instead of having multiple layout handles per file every layout file is associated with a specific handle. For instance, the contents of catalog.xml in M1 have been broken out as catalog_product_view.xml, catalog_category_view.xml, etc. in M2. The main body of these files feels basically like M1, but instead of just using block tags you’ll also be using container tags. Containers are equivalent to core text lists in M1. They simply render all child elements in the specified order. Blocks work in the same manner as M1 with a few exceptions such as how the block type is defined and the ability to specify constructor arguments.

Layout files: M1 vs M2

Catalog

If you know the catalog in M1, you know it in M2. The core structure, as well as many of the settings, remain unchanged.

Products

Managing product attribute sets and attributes in M2 is virtually identical to M1. Very little has changed with product architecture as well. The available product types are all the same as are most of the attributes. The biggest change in M2 is the presentation. Magento experts may find themselves searching a bit for the settings they’re used to while Magento novices will find a less overwhelming experience. It’s obvious that the changes were intended to streamline the product management process, and I personally think they’re effective. One other part of the new process worth mentioning is the ability to switch between certain product types after the product is initially created. While M1 makes you choose the product type up front, M2 lets you switch between simple, virtual, downloadable, and configurable product types based on your settings. It should also be noted that configurable product prices now originate from the associated simple products rather than a base price + additional option costs.

Categories

M2 categories are nearly identical to those in M1. The interface for managing them is the same including the category tree and the tabs (general information, display settings, etc). The major change with categories is the new option to populate them using rules instead of making manual associations, though this feature was also available in Enterprise 1.14.

Order Flow

If you’ve spent your fair share of time learning all the elements of the M1 order flow, you’ll be glad to know that it has stayed pretty much the same. Quotes and quote items become orders and order items. Order states and statuses are all familiar, and shipments, invoices, and credit memos are still around. One nice new feature is the ability to customize the sales grids. You can customize which columns display and save the settings as views for easy access in the future.

Magento 2 order grid

Indexing and Caching

You won’t notice many changes with the caches and indexes in M2. The management is what you’re accustomed to. Indexes can be set to update on save or by schedule. The list of available indexes differs a bit, but nothing looks particularly foreign. The caches are equally similar to their M1 counterparts. Cache types can be individually enabled, disabled, and refreshed and the flush Magento cache and flush cache storage buttons are still around. There are a few new cache types, but they’re pretty self-explanatory. One pleasant addition is the page cache in the community edition.

Indexes: M1 vs M2

Caches: M1 vs M2

A Bright Future for Magento and You

If you’re getting ready to jump into Magento 2, I encourage you to do it with optimism. I was personally nervous to get started but I was soon surprised at how familiar it feels. Once you get past the initial learning curve of some of the new concepts (with the help of Magento’s documentation site), you’ll realize you’re more equipped than you realize to step into the next generation of Magento development. Happy developing!

Operating in Trust

One of the things that we treasure most here at Classy Llama is trust. We operate as a very close knit team, in an environment that is open, free and flexible. Its an incredibly powerful way to operate, and makes working together a beautiful experience because we don’t waste time on politics or power plays or jockeying for position. Everyone strives for the good of the team and the growth of our clients, and the synergy that is created by that is very powerful.

But maintaining an operating environment like this isn’t easy, and it requires above almost everything else that everyone on the team has a mutual trust and respect for each other. To work in an environment where you are very open, about everything including your faults means that people have more opportunities than they would in many companies to hurt you. If you’re afraid of being damaged by something you say, or by expressing vulnerability in some fashion, you’re going to have a hard time being open.

In order to be open, to really work together, you have to believe in the quality and the intentions of the people around you. If you doubt your team members, if you always have questions in the back of your mind about whether or not they are really working for your best interest and looking out for those around them, then you won’t be able to be open. Instead, you’ll be operating in a very protective fashion. You have to guard yourself because you are the only one who is looking out for you.

The problem with operating in this fashion is that it is inefficient, stressful and a detriment to building a solid team. When everyone in a team concerned with guarding their rear, jockeying for position and making sure that there are no chinks in their armor, they spend more time being cautious and dancing around trying to find the highest ground than they do actually being productive.

The beautiful thing is that here at CLS, we don’t have to do that. We operate in an environment where it is okay to let down your guard because everyone else on the team isn’t a bunch of bloodthirsty piranhas looking for a weak moment to take you out. Instead, everyone here works toward helping everyone else out.

It really is the best way to operate. When you see a weakness in a fellow team member, you don’t jump on them and find a way to exploit the opportunity to make yourself look better. Instead, you strive to help that team member grow. You show them how to be stronger, how to improve, how to better themselves as a worker and a person. You flex as needed to help everyone find the best fit and role for themselves.

When this is the approach that everyone on a team is taking, you don’t have to defend yourself all the time. Instead, you can focus on doing things to really serve people. Here at Classy Llama Studios our goal is to selflessly serve the best interests of the other people on our team and our clients. It sound dangerous, serving selflessly. Doing things without worrying about yourself. But when you have a team of people who believe in trust and growth, who believe in really serving each other, then it really is very safe. Instead of you looking out for you, you have many people looking out for you. Everyone has your back, and you are free to run with the tasks you’ve been given.

Don’t waste time building an organization based on politicking and posturing and protecting yourself. Instead, focus on building a team where you can trust the people around you. Find people to work with who are solid folks, who care about those around them… and then trust them to be who you believe they are! When you can begin to trust the people around and live and work in an environment where people are watching your back for you instead of trying to stab it, you’ll get more done, you’ll be much happier, and ultimately you’ll be free to serve and protect and build up those around you – because you trust the people around you to do the same for you.

Trust is a choice. You can know a lot about a person, but choosing to trust them is an act of your will. It does mean you’re at risk of getting hurt, but if you are willing to trust the quality people around you, you might find yourself beginning to lose the armor, and instead be free to run a little faster, to work a little better and to breathe a little easier. It’s a beautiful thing.

Cheers!

Llamas hit the Black Market

Here at Classy Llama, we’ve been hearing rumors that people are going to extreme measures to get their hands on their very own limited edition 2016 Louie the Llama. We get it – he’s cute, and soft and makes an excellent desk companion. So, while understandable, it’s completely unnecessary to lurk around your friends and co-workers with the hope their llama will miraculously fall into your hands. Your love for Louie shouldn’t cause undue stress, and your attempts to get one shouldn’t result in bodily harm (yours or someone else’s).

To help relieve the demand of obtaining your own Louie, we’ve stocked our IRCE booth with plenty of them. No back-alley deals or sneaky swipes necessary. You (and your llama) can sleep better at night knowing your own Louie was secured in a friendly, non-black market way.

We hope to see you at IRCE (Internet Retailer Conference + Exhibition) in Chicago, June 7-10. You can find us at booth #937.

Classy Llama Superheroes

And just between you and me – we’ll also have other sweet swag you can nab to make all of your family, friends, co-workers and general acquaintances jealous.

See you in Chicago!

Contact Us