stephenmcd/cartridge — pull request #78 by rterbush (2012-12-31 15:13:38+00:00)
Title: Allow for open ended sales, only requiring start date

Stephen,

With this suggested code change, I am trying to support the following template code:

{% if not p.on_sale %}
{{ p.price|currency }}
{% else %}
{{ p.unit_price|currency }}
{{ p.sale_price|currency }}

Save {{ p.unit_price|subtract:p.price|currency }}
{% endif %}

Perhaps there is another way to accomplish this, but being able to check if p.on_sale allows for setting prices for when the sale is effective and design the template code that will highlight the sale price if the sale is in effect rather than simply if there is a configured sale price. I think this change supports your desire to be able to configure a sale without an end date. No idea if the logic in the admin allows for setting a start date without an end date yet.

Thoughts? (this is yet untested but passes my visual parser)