Layout Caching

Often times when I am developing in Magento, I do not take the time to dig in and find out exactly how something is working.  Instead, I assume that they will work the way expect them to work.  I was recently working in a situation where I wanted to change the functionality of a grouped product page to use an entirely different layout.  Normally, I would have expected to be able to simply remove certain handles and add others to the layout.  For products, this is buried inside several different function calls but I eventually found what I was looking for (the addition of the product specific handles) in Mage_Catalog_Helper_Product_View::initProductLayout.  I proceeded to modify the layout to load my code by replacing the default:

$update->addHandle('default');
$controller->addActionLayoutHandles();
$update->addHandle('PRODUCT_TYPE_' . $product->getTypeId());
$update->addHandle('PRODUCT_' . $product->getId());
$controller->loadLayoutUpdates();

Depending on whether the product was a grouped product or not, I changed which handles were used.  Since we didn’t want all of the PRODUCT_ handles or even the catalog_product_view handle for grouped products anymore, I modified the layout portion to:

$update->load('default');
$update->load('myhandle_index_index');

This worked just fine until I turned caching on. It turned out that the load method uses caching (specifically the layout cache tag) to store the results of loading default. This cached value is the result after all merging had been finished, so when the second load ran, it was simply added to the end of the layout without merging the two together, which resulted in a fairly jumbled up layout. Once I dug in and found out what the issue was, it turned out to be a simple fix to make sure the cached version would be correct:

$update->load(array('default', 'myhandle_index_index'));

It is likely that this would have worked just as well:

$update->addHandle('default');
$update->addHandle('myhandle_index_index');
$controller->loadLayoutUpdates();

So if you ever find that your layout caching is causing problems, make sure you are using one of the solutions that takes caching into account above and not calling load for each handle.

Classy Llama is a Gold Sponsor at Imagine 2013!

Looking back at 2012

To say the last year has been a whirlwind for Classy Llama would be an understatement. We can hardly believe that 2012 is gone and we’re nearly through the first quarter of 2013! Last year was a year of innovation, client success, and expanded relationships as we repositioned to serve our clients as a full-service eCommerce agency. This shift has produced strong and consistent growth in our relationships with both clients and industry partners, and we’re continually humbled by the response. Looking back, we’re pleased (but not surprised) to admit that many of these achievements are due in no small part to the contacts and relationships forged during the Imagine 2012 conference.

Let’s do it again!

The team’s experience at Imagine 2012 is often remembered for its short nights, fun, food, and incredible networking opportunities. When it came time to begin planning for Imagine 2013, we couldn’t wait to book the tickets. The world-class accommodations of the M Resort provided a great “Vegas Experience” without all of the craziness associated with the pace of a traditional “on the strip” location. The lower key atmosphere created a great atmosphere to visit (and in some cases bond) with the thousands of other attendees. Kurt Theobald, our CEO, claims to have set a new personal record for words spoken in a 72-hour period (no small achievement, if you know Kurt). In fact, he made so many new friends during the conference that he even admits to having felt “lonely” for several days after returning home.

Llama Sightings (where to find us)

As you might have noticed, we’re excited to be returning to Imagine 2013 and would love to see you there. To demonstrate our commitment to the Magento platform and the value we believe the Imagine conference delivers, Classy Llama is once again a Gold level conference sponsor. We’re so convinced that Magento is the best platform to serve our clients, that it continues to be the sole focus of our business. Imagine offers a great chance to hear from the sharpest minds in the eCommerce industry and learn about the greatest technology and strategies available to grow your business. As always, you’ll be able to find the team at our booth in the main exhibition area, and we hope you’ll swing by to say hello.

Is Your Ecommerce Marketplace Holiday Shopping Season Ready?

Whether you opened your doors this year or have been in business for over a decade, preparing for the upcoming holiday season is a task that nobody should overlook. For many online retailers, the holiday season can account for 40% or more of yearly revenue. You owe it to yourself and your customers to ensure that your site is ready for the onslaught of Cyber Monday and beyond. Take a few moments to review some key areas with us.

Features & Usability


When your customers come to your site, do you provide them the tools necessary to find and use your site to its maximum potential? With the plethora of other sites out there, your site needs to connect your customers to what they are looking for quickly, allow them to easily navigate your site, bring them up to speed on what you offer, and get them through the checkout efficiently. Below is a short list of things you should ask yourself and make plans to get ready for your site.

  1. Are my customers utilizing the search box on my site? Is it leading them to the products that they are adding to their cart?
  2. Do my products have good images and thorough product descriptions?
  3. Do my customers utilize reviews to provide feedback on products?
  4. Are there features my site should implement to make my customers happier (e.g. Live chat)?

Performance & Growth


It is very common for people to address growth when things get bad. Comments like “hey, our site is slow” are common reasons for people to look at making their site faster. You would be very lucky if your customers were nice enough to tell you about that problem. Most of them will simply get frustrated and go somewhere else. Your site may have been hosted properly 18 months ago, but with more traffic, your current services package may be strained with the growth you’ve experienced. A solid review of your existing site growth and performance is highly recommended. Double-check the following items.

  1. Am I expecting a surge in traffic on Cyber Monday (November 26, 2012)? Is my infrastructure ready to handle this traffic?
  2. Does my managed services provider have a plan to mitigate problems during the busiest time of the year?
  3. Have I taken into consideration the growth of my site (number of products, customers, visitors, and transactions) and ensured that it is still sized appropriately?
  4. Is my site fast? Are the pages loading fast enough? (Use this tool to check it.)

Marketing

“If you build it they will come,” the line from the 1989 movie starring Kevin Costner may sound too good to be true… because it is. You should be investing in getting existing customers to come back and in new customers to make their first purchases. While it is not feasible to review all the possibilities you could be thinking about, a good way to start is with these basic questions. Take some time to flesh this stuff out now so that you can start planning to implement as soon as possible.

  1. What am I doing to encourage and incentivize new and existing customers to come back?
  2. How am I communicating those opportunities to my customers? Can I measure how well it works?
  3. Is sufficient data being gathered on where my customers are coming from and going to on the site?

Analytics


Having accurate information about how people come to your site, where they go while they are there, and what they do while they are there is absolutely essential. In a time where the available marketing options are numerous, the only to know what is working (and what is not) is to have good data. If you are not using analytics, you need to start today. A “no” to any of these questions means you should really take steps today to start capturing data today.

  1. Am I able to know where my customers are leaving? If they drop out during checkout, can I pinpoint the step at which they are dropping out?
  2. Are my AdWords (or any other PPC system) conversions being properly captured?
  3. Do my marketing campaigns (social, email, and other) integrate with my analytics platform?

Managed Services & Support


When it comes time to deliver, is your managed services provider / hosting company going to be able to deliver? Like a high-performance car, all of the glitz, features, and thrill can be quickly extinguished if you don’t put the right kind of fuel in the car. Don’t make the same mistake with your website. Make sure your managed services provider is top-notch and ready to take on what will be thrown at them and at you.

  1. Is my service provider available 24/7? Are they ready for Cyber Monday?
  2. When was the last time I reviewed my existing provider’s Service Level Agreement?
  3. Do I know who to contact when a problem arises?

We are Here to Help

If you can’t answer any of these questions adequately, and you need support, don’t wait until it becomes a problem. Save yourself the money lost, the frustration, and the extra cost of an emergency. Contact us today.

Come Visit Classy Llama at ZendCon 2012 – Booth 320

We’re excited that in a little over a week, a group of folks from Classy Llama will be heading over to Santa Clara for ZendCon 2012. ZendCon is the PHP conference where the industry leaders get together to learn more about PHP and talk about what the future holds. Perhaps it is just my nerdy side (although, I’m not sure if there is any other side) but it is always invigorating to see how the PHP community has continued to evolve and improve!

So, if you are going to be at ZendCon, come on by and visit our booth. We will be booth #320 — between the Oracle and New Relic booths. Come by just to say “hi,” learn more about Classy Llama, or talk about how Magento and Zend have revolutionized open-source eCommerce. We look forward to it!

Switching Images on a Configurable Product with MagicZoomPlus and Magento

We’ve found out how to swap images based on a configurable option with MagicZoomPlus! And we’ve done it despite the misleading feature description from Magic Toolbox’s Magento Modules FAQ section:

Q   Do these tools support configurable products?
A   Configurable products are not supported but configurable product attributes and product options are supported.

Also, no need to edit any code or install the Better Configurable Products (BCP) Module they suggest!

Here’s How to Set Up MagicZoomPlus to Get Configurable Products to Swap Images

The tricky part is getting all the steps below exactly right. Miss one of them and the whole thing blows up.

  1. Install the Magic Zoom Plus for Magento Module
  2. Create a configurable product with associated simple products.
    • CRITICAL NOTE #1: You need to set an image on the configurable product in order for MagicZoomPlus to even initiate on the product page.
  3. Set the Base Image for each of your associated simple products See screenshot.
    • CRITICAL NOTE #2: If you do not set the image as Base Image, it will NOT work
  4. One tiny setting in the admin > MagicToolbox > MagicZoom Plus Configuration makes all the difference! Set Show associated product's images when selecting options under the Miscellaneous section to Yes. See screenshot.

That’s it! Seems too simple to be a hassle, but you have to have all the right pieces lined up just right in order for it to fly.

Oh, and by the way, it works perfectly with multiple configurable options too! No additional work needed!

Pixel Perfect

If you’re anything like me, every once in a while you just need to try something new. I believe that for creative individuals this is an extremely important practice. When I’m craving something creative I’ll explore tons of different things such as digital painting techniques, photography, or branding a fake company.

This week, inspired by my memories of 8-bit Nintendo characters, I decided to “pixelate” the llamas. At first, this seemed like an easy endeavor. I quickly found that it was exactly the opposite. Working with single pixels, you are obviously limited. The more pixels you have – the more room you have to be detailed, and thus, the easier it is to create a recognizable character. It’s amazing how pixels force you to completely rethink how to portray the subject you’re creating. So, while I was pixelating all of my co-workers, I had to choose carefully what features, quirks, and personalities could be achieved within my limitations.

Although these images are extremely small, they are very detailed. They turned out to be extremely accurate representations of everyone in my office.

Enjoy!

-Jeremy Wells

Customer Data Integrity & Magento One-Page Checkout

Do you have clients who are reporting that their customers are unable to check out, but you can’t find any problem with your client’s Magento checkout process? Are customers of your Magento site complaining that they have to re-enter their address because they can’t check out? We may have an answer for you!

Yesterday, we discovered the source of a particularly ugly issue that has been plaguing one of our clients.

For months, customers of this client’s Magento site have been complaining of problems checking out, but we’ve never been able to reproduce their issues. We found out yesterday that there was a gap in some of the customer data that had been imported into Magento when the site was first built. Some customers have customer accounts with saved addresses, but those addresses do not have phone numbers. This discovery came from a detailed email sent by a very kind customer talking about their problems.

When a customer logged into their account and attempted to check out using an address with no phone number, Magento was showing them an error.

The big problem here is that there is no readily apparent way for a customer to fix this issue. Customers ended up becoming irritated and were abandoning orders and leaving the site.

If your client is reporting the following kinds of problems with their Magento site, they may potentially be affected by this bug:

“My customers complain that Magento won’t let them check out.”
“Magento is telling my customers there is something wrong with their address.”
“My customers complain that they have to enter their billing/shipping address again in order to be able to check out.”
“Magento is telling my customers they need to enter a phone number, but they can’t figure out how to do it.”

This problem can only occur when addresses have been imported without phone numbers. A customer can never enter a new address in Magento without a phone number. So, if this problem is being reported but no customer data was ever imported, then the problem has a different root cause. However, if customer data was imported, what is most likely happening is that some customer addresses were imported without phone numbers.

The simplest fix for this problem is to locate all the customer addresses in the Magento database which do not have phone numbers and populate the phone number field with a string of seven 0s (0000000000). This will allow a customer to check out without being blocked by this error outlined above.

The important takeaway for any new Magento build is this: when importing customer data, ALL CUSTOMER ADDRESSES MUST HAVE PHONE NUMBERS. You must check to make sure that there are no gaps in the phone number data, and if there are, you must work with your client to identify a way to fill these gaps – whether with 0s or real data. These gaps must be filled so that the error outlined here does not occur.

For reasons all of the technical folks reading this article will understand, this is a very ugly bug that can be extremely troublesome for customers, but nearly impossible to catch and diagnose. Knowing this information will help you prevent your clients from falling prey to this problem, or help them fix it if they have the problem already.

Cheers!

Classy Llama at IRCE 2012

We are in the thick of expo and conference season here at Classy Llama Studios!  We love the opportunity to meet with partners and clients, both existing and potential, in person — somewhat of a luxury in our business.  IRCE 2012 is next up (June 5th-7th), and it’s a great place to stay abreast of what is cutting edge in eCommerce technology.

This year, we have sponsored a 10’x20’ booth, which is definitely the biggest to date.  Because we have changed our branding significantly to reflect who we are as a company, we wanted to make sure we got noticed.  The feedback we have been getting over the last year is that our reputation is that we are solid on our ability to deliver clean, complex eCommerce solutions on the Magento Enterprise platform.  We were excited at this feedback, but we noticed something clearly missing from that message — we aren’t just a development shop, but a full-service eCommerce agency, capable of great design as well as supporting our clients in growing their business with ongoing marketing services!

We wanted to extend an invitation to all of our industry friends (and could-be-friends) to visit our booth, or better yet, schedule a meeting with us.  We’ve provided a map below with the IRCE floor layout and our booth marked on it.  We are booth number 1815.

Imagine 2012 brings new releases of Magento Commerce and Open Source editions!

Magento Imagine 2012 in Las Vegas was an event to be remembered, and it was quite a while ago, and I’m still recovering from it.

As Magento has continued to grow, we are impressed at their ability to keep it personal. Every detail in the events exuded quality and the focus on relationships. The expo hall was a much more open and relaxed environment, unlike the more crowded and sterile Expo feel. There was so much attention to the details, down to the matches at the hand-rolled cigar stand being branded with the Magento logo. As at Innovate, the final keynotes were dismissed to the Magento staff lined up clapping for their clients and partners, a nice final touch. Imagine and Innovate are our favorite events every year.

One of the key announcements was the release of Magento Commerce 1.12 and Open Source 1.7. There is a ton to say about these, and I recommend reading about these straight from the horse’s mouth. A couple features that excited me are the expanded CMS capabilities and the ability to target visitors with specific marketing messages without them having to log in to be recognized by the platform. Find out about all of the improvements at Magento’s page about the new releases.

Posted on May 24, 2012

Wiz 0.9.8: Bug Fixes, Admin Extension Updates, & General Improvements

It has been a while since we talked about Wiz. There have been a couple of version bumps since the last update. These bumps are arbitrary but it seems like they accurately reflect progress made. There has been progressing towards a 1.0 release. The idea of a 1.0 is mostly solidified.

The 1.0 Roadmap

  • local and community plugin interface – a way for people and groups of people to add their own modules and modules that can be shared with a group.
  • configuration system – Although Wiz already has an API for user-configuration, it needs to be better tested and supported.
  • cleaner API – looking at ways that the API can be better for anyone that might want to develop extensions.
  • complete docs – API docs. Right now you just have to look through the code.
  • auto-updating – If anyone wants to help with this, that would be great. It would be awesome if it integrated directly with Github.

New Functionality

  1. You can now pull packages from Magento Connect with the mc-dl and mc-versions functions.
  2. admin-list lists admins in the backend.
  3. admin-enable and admin-disable can be used to enable and disable admin users.
  4. admin-resources can be used to list the resources that modules set up in the ACL.
  5. magento-startup and magento-shutdown allow you to add and remove the maintenance flag.
  6. config-storeget <path> --all lists the given path for all stores.
  7. magento-script --profile will show profiler information after execution.
  8. config-asxml now takes an argument --system which dumps the system.xml files.

General Improvements

  1. If you set up devel-showhints while developer IP restrictions are set, it gives you a warning.
  2. Functions provided by plugins no longer have to return true or false. Everything is assumed to be good unless an exception is thrown.
  3. module-list now shows the version in the module and in the core_resource table.
  4. Command line arguments (e.g. –example) are now parsed and removed from the array that gets passed to plugin methods. This doesn’t really affect anything unless you have custom modules that look for arguments within those methods.
  5. Wiz::getArg() now takes two arguments instead of one. The second argument is the default value that will be returned if the argument is missing.
  6. Added some documentation for various functions and did some general code cleanup.
  7. The bash completion script is now more awesome. It add further completion capabilities and aims to provide more information.

Bug Fixes

  1. Basically config-asxml didn’t work. Now it works and you can set up indentation to be what you’d like (via --indent).

I think basically sums up what has happened over the past couple of months. Many thanks to Ben Robie & Jeremy Young for their contributions.

Contact Us