I suspect that 90% of the problem might be fairly easily fixed by
removing the sale context variable from the context processor (since
it's set in a product-specific manner by the get_product view anyway),
and changing the test in the template that determines whether to
include the sale message from {% if sale %} to {% if sale.automatic
%}.

However, the discounts have other drawbacks that are preventing us
from using them to implement sales (e.g. only using one discount code
at a time, so if we have 50% off t-shirts and 30% off coffee mugs, the
user can't get both on one purchase).

I'm probably going to go a different direction and implement a Sale
module that applies automatic discounts without taking codes.  Would
there be any interest in having that in core?  It's going to require
some tweaks to core anyway, in various methods that calculate prices
and cart/order totals.




On Jun 1, 8:30 pm, Chris Moffitt <[email protected]> wrote:
> This is definitely not the intended behavior. We probably do need to give
> some TLC to the discount process. Any patches are welcome.
>
> -Chris
>
>
>
>
>
>
>
> On Wed, Jun 1, 2011 at 5:04 PM, Nan <[email protected]> wrote:
> > DiscountManager.get_sale() does not filter on whether a sale is
> > restricted to certain products, and due to Satchmo's settings context
> > processor, the result of this method call is applied as a "sale"
> > context variable to every page, overriding any "sale" variable set in
> > the view.
>
> > Since the product/product_discount_eligible.html template is included
> > based on the value of "sale", the sale message ("This product is
> > eligible to receive a discount...")  displays on every product's page,
> > not only the eligible ones.
>
> > So say I have a 50% off sale on all T-shirts, applied to the T-shirt
> > category.  There's a message not only on the T-shirt pages but also on
> > the coffee mug pages saying that the product on that page is eligible
> > for a discount.  Then I get a bunch of irate customers calling up
> > asking why the heck they were charged full price for coffee mugs when
> > my site said they were half off.
>
> > Additionally, the "sale" variable is used to calculate the displayed
> > discounted price, so if the "best discount" available for a product
> > (as calculated in the get_product view) is not the one being
> > advertised in this site-wide sale, the discounted price is incorrect.
>
> > I'm trying to work around some of this with custom views and
> > templates, but is this the intended behavior?
>
> > --
> > 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.

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