make distinction between 0.00 and no price record

Create issue
Issue #992 new
jb0t created an issue

A price record set to 0.00 would indicate that something is free. Whereas no price record should be treated as not for sale by way of money, and potentially act as inventory count 0 when adding to cart. Perhaps like the 'allow adding 0 inventory' option, there could be a, 'allow non priced items to be added to cart' option as well.

Making this distinction would also allow people to have more control over product purchasing when writing signals. Currently, to do so requires getting involved with the price resolution logic, since it simply returns 0.00 when there is no record.

Comments (1)

  1. Hynek Cernoch

    If I imagine what everything should be changed to support None price or some similar value instead of Decimal("0.00") (fixed templatetags, some methods for cart, order, some tax modules, payment modules and everything what can eventually use product price) it is easier to do what you consider complicated.

    It would be easy to give result int(0) instead of Decimal("0.00") because integer is completely compatible with Decimal and it should not cause issues. But I doubt that it is good in general. A clean reliable good documented framework is more usable than an mysterious. You can write some howto to the Wiki, offer it in the forum and see acceptance.

    Use the first example in the documentation for signals under the title "Putting it All Together" and modify it.

    (I incline preliminarily to "wontfix")

  2. Log in to comment