Blog

Archive for June, 2009

June 25 2009

Checkout Now Supports Flexible System of Chargesby railsdog

The edge version of Spree has just been refactored to allow support for a new and improved system of order charges. This recent commit gives you the ability to have an arbitrary number of charges associated with the order. You are no longer restricted to just shipping and tax amounts (although those are still supported as charges now.) This allows your checkout logic to add your own custom fees (and descriptions) if needed.

There is a new rake task which should migrate your existing orders so that they now have shipping and tax charges when applicable. As always, please backup your database before attempting to run the migrations. If you're running the source you'll also need to remove the now empty vendor/extensions/tax_calculator directory after your git pull.

This code is very edge so be prepared for a few bumps if you decide to use it. There is at least one known issue and we'll likely encounter a few more as we go. You may also want to do a search in your custom code for references to tax_amount and ship_amount. These are no longer valid attributes for the order model. If you need the tax or shipping total for something, however, you can do the following:


  @order.tax_charges.sum(:amount)

So now that we can support an arbitrary number of charges, the next task is to support an arbitrary number (and type) of credits. This concept should be relatively easy since a credit is really just the flip side of a charge. Once that is implemented we can finally get to the coupon and discount stuff that we have been planning for a while now.

June 15 2009

New Website Launchedby railsdog

Today we are proud to announce the launch of our new website. The updated site has been several weeks in the making and we've got a lot of new features that we think will help promote further adoption of the Spree platform. There may be a few rough spots since we were in a hurry trying to meet our own self-imposed deadline. The documentation section in particular is likely to be a little bit rough and a few spots are still outdated. With the site redesign behind us, we'll be getting back to applying code patches and improving the documentation.

Paul Callaghan has been improving our documentation while Brian Quinn has been hard at work migrating our issue tracker over to Lighthouse. The move to LH is going to have several benefits for us, including improved integration with GitHub. We're going to have a slightly more formal issue reporting and resolution process which I'll explain in more detail later in the week. Unfortunately we were not able to preserve the issue authorship informaiton during the migration. Actually, its preserved but as part of the issue text (Reported by: Sean Schofield.) So you will have to sign up for LH if you don't already have an account. In theory this lowers the barrier for reporting issues since many Rails developers already have a LH account. They also accept OpenID if you're into that sort of thing.

Paul Callaghan and I have been working on the new extension directory which we will now be using to keep track of all of the third party extensions people have been writing. We've got a bunch of them in there already with many more to be added still. If you have extensions to share please publish on GitHub and add them to our registry. Make sure you follow the instructions in our new online documentation concerning the creation of your own extensions. Special thanks to Juan José Vidal (juanjo) for the original contribution of code in the form of the tension project.

We have also made significant changes to our wiki. Most of the wiki has been ported over to the new Spree Guides. We still have a lot of clean up to do on our wiki but we didn't want to hold things up over such a small thing. In the next few days we'll be combing through the wiki and getting it down to just the bare essentials. The idea is that the wiki is going to be for FAQ, troubleshooting and other advice from users. The thinking is that the wiki is still useful even though we have this great online documentation as well. Its a work in progress so we'll see how this works out in the coming weeks.

If you're curious about who helped us with the redesign, we hired Erika Greco whose quality of work speaks for itself.

June 11 2009

New on Edge Spree: jsTree & jQuery.noconflictby brianquinn

We've just finished retiring the YUI tree control that was being used to maintain Taxonomies and replaced it with the jQuery friendly jsTree. This is the first step in migrating the admin interface to use jQuery only (and completely removing Prototype). The new jsTree provides much more precise drag & drop functionality allowing you to re-order and drop nodes under new parents quite easily. The UI has also be tested under FF3 and Safari3 on OSX as well as FF3 and IE7 on Windows and seems to play well on all platforms, please feel free to log any cross-platform issues discovered.

jQuery is currently running using the noconflict() option for the Administration interface only, this should help avoid any issues with Prototype during the transition. We plan in enable noconflict() on the customer facing interface at some point in the future to allow developers to use Prototype if they wish in their site extensions.

We've also included the jQuery.alerts plugin that provides richer replacements for the standard javascript alert and confirm methods. We'd suggest that any extension developer should look at including them for things like delete confirmations, see taxonomy.js for example usage.