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

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

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

2

Add Custom Layout Handles (e.g. Parent Categories)

If you ever need custom layout handles in your local.xml, it's fairly simple. In this example the observer method will make a new handle for for categories that have children or not, but you can just modify the method to make whatever handles you desire. (I realized after creating this there's already a handle for anchored categories with no subcategories, catalog_category_layered_nochildren) First add this to your config.xml in yourcustommodule: <config> <frontend> <events> <controller_action_layout_load_before> <observers> <yourcustomtheme_observer> <class>yourcustomtheme/observer</class> <method>addHandles</method...

Posted on June 1, 2011

Posted under Development, Magento, Magento Development by Kevin Kirchner

Wiz 0.9.0-beta: Specify Scope, Create EE Admin Users, and more...

The initial flow of love for Wiz was greatly appreciated!  I'm not certain how many people actually have downloaded and are using Wiz today.  We may never know fully...  But the buzz that was generated was definitely invigorating! We have recently rolled Wiz out to our entire team here at Classy Llama.  No doubt within the next few weeks we will see more features being added as our people put it through the hoops.  Enough about that.  Let's get on with it! Specifying a scope code By default, Wiz will execute your commands running inside of the admin scope.  This is great for practically everything, however using the 301-urlskumap to generate a CSV of SKUs to URLs caused issues when running inside of the admin.  Now all you have to do is: wiz 301-urlskumap --store [geshifilter-code]...

Posted on March 30, 2011

Posted under Development, Wiz by

4

No More Square (White Background) Magento Product Images

Do you have a site with product images of varying proportions. It can be annoying when Magento gives you that white border to make your product image square. Here's how customize what color that background is: just add backgroundcolor('000', '000', '000') before the resize() method <code> &lt;img src="&lt;?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail',<br/> $_image->getFile())->backgroundcolor('000', '000', '000')->resize(100); ?>" ... /> </code> Better yet, get rid of the background using keepFrame(false): &lt;img src="&lt;?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail',<br/> $_image->getFile())->keepFrame(false)->resize(100...

Posted on March 21, 2011

Posted under Development, Magento Development by Kevin Kirchner