On Jul 28, 5:41 pm, Brian Lee <[email protected]> wrote: > How can I place a product on Sale so that the below code's if case is > triggered (from default product template)? > > I thought it would be to have two prices with one having expiration > date. But that is not the case. > > {% if sale %}<strike id="fullprice" style="display: > block;">{{ product|discount_price:""|currency }}</strike>{% endif %} > <span id="price">{{ product|discount_price:sale|currency }}</span> > > Where do I need to look to see how {% if sale % is triggered?
Proper 'sales' as normally understood (30% off Brand X, no discount code required) are not directly supported in Satchmo as best as I can tell. The 'sale' template tag returns an actual Discount code object if and only if there is an automatic discount (aka store wide sale). See [1] for the relevant criteria used for selecting a Discount as 'sale'. No other types of Discounts or temporary price reductions will automatically show up for this template tag. I'm am currently trying to work out a template tag which will cover all cases, but it's a beast. [1] http://bitbucket.org/chris1610/satchmo/src/0bd6df5821d2/satchmo/apps/product/utils.py#cl-26 -- You received this message because you are subscribed to the Google Groups "Satchmo users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/satchmo-users?hl=en.
