I prefer template change over code "hacks", because I have these
templates customized yet and template tag not so much.
Evenso easy you can create your own satchmo_currency.py  in something/
yourapp/templatetags and move the line 'yourapp/localsite' somewhere
before 'satchmo_store.shop' in INSTALLED_APPS. If you want to replace
only one function in satchmo_currency, this would be optimal and
possible but this would be a hack reserved for "no other solution dos
not exist".

in the settings.py. This directory has precedence

On Mar 15, 4:50 am, Luke <[email protected]> wrote:
> That would work, but still seems a little hokey.  I was thinking there
> should be a way to do it without changing all the templates.  Aren't
> we putting too much logic in the templates that really should be in
> the model itself, so that it is more easily extensible without
> changing lots of templates?
>
> On Mar 12, 4:14 pm, hynekcer <[email protected]> wrote:
>
> > Luke,
> > a natural simple solution is with a high price 999999. User sees "Call
> > for price", because you create a custom template tag or a beginner
> > rewrites template product.html
>
> > {% if product.unit_price < 999999 %}{{ product|discount_price:""|
> > currency }}{% else %}Call for price{% %}
>
> > User can even add this product to the cart, but of self-interest calls
> > for price. The same way can be replaced cart|discount_cart_total to
> > conditional "Call for".
>
> > Other solution is with "Product Attributes", but not so nice.
> > /admin/product/product/, select product, Product Attribute, Option add
> > new e.g. Attribute Option: Description: "Call for price", Field
> > validations: "integer" (because "1" is easier written then "yes"),
> > Message: "write 1 or delete attr".
> > Attribute can by accessed by
> >     product.productattribute_set.get(option__name='call-price').value
>
> > More
> > On Mar 12, 2:22 am, Luke <[email protected]> wrote:
>
> > > Some products in our client's store don't have a set price.  We want
> > > to just display 'call for price' and not let these items be added to
> > > inventory.
>
> > > I would think that we could accomplish this simply by not setting any
> > > price on the product, but this displays $0.00.
>
> > > I can make my own custom version of the satchmo_currency.py file to
> > > modify the 'currency' filter, and look for a value of 0, then return
> > > my 'call for price' string there.  Then I'd only need to change the {%
> > > load satchmo_currency satchmo_category %} line at the top of the
> > > templates.  But this solution would loose the ability to have a
> > > product with a set price of $0
>
> > > So I could add a price of $-1 or something, and look for that price
> > > instead.  But don't these both seem kinda ugly solutions?
>
> > > Am I missing some obvious spot to put this in?  Is there just a method
> > > on Product that I can override to have this custom behavior?
>
> > > Thanks much,
> > > Luke

-- 
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.

Reply via email to