2

Unravelling Magento's collectTotals: Orders and Caveats

Previous Entries Part 1: Introduction Part 2: The Core Process The focus of this series is Magento's process for calculating and displaying cart totals. We have taken a thorough look at the code involved with the core process, but there are a few important points left to cover. Transferring totals to the order What we've seen so far all relates to what's happening when a cart is still in progress, and it makes sense that that's where the truly hard work is done. But at some point (we hope), a cart will become an order. What happens then? There are several relevant points: Frequently, the same database fields we've seen in the quote tables (ex. "gift_cards_amount" and "base_gift_cards_amount") will show up in the order tables as well. Where these fields are present in...

Posted on May 8, 2013

Posted under Development, Magento Development, PHP by Chris Nanninga

1

Unravelling Magento's collectTotals: The Core Process

Previous entries Part 1: Introduction In this series, we're looking at Magento's process for calculating and displaying totals for a cart. In our introduction we briefly covered what a "total" or "total collector" is and saw how one is defined in config.xml. Now it's time to take a closer look at the models and data structure involved. The job of a total collector model can be divided into two processes: Calculation and display. You're highly encouraged to open up the Magento codebase and follow along in the referenced code. The collectTotals process As mentioned in the previous article, the calculation of cart totals is kicked off with a call to Mage_Sales_Model_Quote::collectTotals. Before taking a look at code, there are a few things to take note of about the underlying...

Posted on May 1, 2013

Posted under Development, Magento Development, PHP by Chris Nanninga

Unravelling Magento's collectTotals: Introduction

In this series, I'll be explaining the process by which Magento handles calculating and displaying totals in the cart (i.e., subtotal, tax, discount, grand total, etc), and how to customize this process for your own purposes. At its core, handling product prices and totals in an online shopping cart seems simple. Multiply the cart quantities by product prices. Add shipping. Add tax. And there you have it. The first time you have reason to modify the way cart totals are calculated and displayed in Magento, however, what you'll find is anything but simple. In fact, your first impulse may be to run far, far away. Why the complexity? Well, the first and most obvious reason is that even straightforward totals calculations aren't as simple as they appear. Is shipping a percentage or a...

Posted on April 24, 2013

Posted under Development, Magento Development, PHP by Chris Nanninga

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...

Posted on March 21, 2013

Posted under Magento Development by Jonathan Hodges

2

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 inconlusive 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. Install the Magic Zoom Plus for Magento Module Create a configurable product with associated simple products. CRITICAL...

Posted on August 22, 2012

Posted under configurable, Development, Magento, Magento Development, MagicZoomPlus by Kevin Kirchner

5

Customer Data Integrity & Magento One-Page Checkout

Do you have clients who are reporting that their customers are unable to checkout, 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 their 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...

Posted on June 14, 2012

Posted under General Business, Magento, Magento Development by Rob Tull

8

Most Magento Certified Developers in the World!

We've got some great news to share here at Classy Llama: Five of our developers took the Magento Certified Developer exam yesterday, and all five passed with flying colors. This brings our total count of Magento Certified Developers to nine, with seven having the distinction of the Plus certification.  This means that we have more Certified Developers than any company in the world.  We also have the privilege of being a member of the Developer Certification Board. What does this mean for the future at Classy Llama? It means we'll continue to be able to find and create dependable solutions to any need you have for your Magento eCommerce store and you'll be able to count on the solutions we provide to work as expected, without hiccups. We want to congratulate Chris, Dave, Jonathan,...

Posted on February 22, 2012

Posted under Development, Magento, Magento Development by Erik Hansen

7

Magento Modules and the Community

This post outlines some of our thoughts about the state of the Magento module community, and an idea for how Magento can improve the quality of that community. This post outlines some of our thoughts about the state of the Magento module community, and an idea for how Magento can improve the quality of that community. Here at Classy Llama Studios we create our own Magento modules every day and have high standards for any module that we write.  These standards include having properly commented code, adhering to Zend programming standards, and having both the code and functionality of the module reviewed before it is released.  Magento is great because, instead of having to write every module that we use, there are numerous other quality development companies whose modules we can draw from...

Posted on October 6, 2011

Posted under Community, Development, Magento, Magento, Magento Development, Management, Modules by Jonathan Hodges

1

Wiz 0.9.5: Admin & Developer Tools, Batch Output

The latest batch of Wiz updates includes some useful stuff for developers as well as some administrative features. Included in this bundle of Wizzy goodness is the ability to output any table output in csv, pipe, or tab delimited output. This makes it very easy to utilize Wiz with other commands (or potentially feed information from Wiz back into itself!) Here is a complete list of the changes in 0.9.5: The internal configuration system was rewritten to look more like Magento's own configuration system -- using XML files. This isn't really used heavily yet, but we've got some stuff coming in the next few months that will take full advantage of this. You can now toggle the following "developer" flags from the CLI: Allow Symlinks (For templates, 1.5.1.0+) Logging JS Merging CSS Merging...

Posted on October 4, 2011

Posted under Development, Magento, Magento Development, Wiz by

6

The Magento Developer Certification

As many of you know, Magento recently announced their Magento Developer Certification program.  As one of the few partners who have been involved with Magento since it's inception, we're especially excited to see this long-awaited program finally being launched. Due to our depth of knowledge and experience with the Magento platform, Magento invited us to be a part of the Magento Certification Advisory Board. We've been involved in the process of writing questions for the certification for the past couple of months.  I want to extend congratulations to one of our Lead Developer's, David Alger, for representing Classy Llama on the Advisory Board.  His contribution to the development of the certification has been substantial - he even won the award for completing the most number of...

Posted on October 3, 2011

Posted under Magento Development by Erik Hansen