Issue #49 resolved

Contribution: cart_tags.py

Anonymous created an issue

Adds a template tag "cart" which pushes the current cart into the context like so

{% cart as varname %}

Includes a simple "NullCart" implementation which eliminates having to test for the absence of a cart.

Reported by bkroeze

Comments (4)

  1. Anonymous

    For example, with your version, I can't do this:

    currency

    at least not without explicitly testing for an empty cart.

  2. Anonymous

    Argh. Evidently I was using the pre-satchmoproject SVN repository. "cart" wasn't in the context_processor I had, and when I synced up before posting it, I didn't get the latest.

    The only advantage to my contribution is the NullCart implementation, which I think is superior to just an empty string.

  3. Log in to comment