Hi,
I run into the same issue awhile back. It's on my list to make it more
clean and use a templatetag
instead of this Hack.
But here is a quick hack to show the full price strike through and the
sale price
"""
<p>
<span class="product-titles">Price:</span>
{% if product.get_qty_price_list.1.1 %}
<span style="text-decoration: line-
through;">{{ product.get_qty_price_list.0.1|currency }}</span>
 
<span style="color:red;">{{ product|discount_price:sale|currency }}
</span>
{% else %}
{{ product|discount_price:sale|currency }}
{% endif %}
</p>
"""
Hope it helps
lzantal
On Jul 28, 2:41 pm, Brian Lee <ble...@gmail.com> wrote:
On Jul 28, 5:41 pm, Brian Lee <ble...@gmail.com> 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.
Hello Scott, I was wondering did you manage to develop this template tag after all ? I am trying to implement sales for particular products without discount code too...
On Wednesday, July 28, 2010 11:49:39 PM UTC+1, John-Scott wrote:
> On Jul 28, 5:41 pm, Brian Lee <ble...@gmail.com> 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.
> > 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.
I needed that functionality as well. I ended up using is adding a second price for the product with an expiration date then in my template I check for that price.
"""
{% if product.get_qty_price_list.1.1 %} <span style="text-decoration: line-through;">{{ product.get_qty_price_list.0.1|currency }}</span>
<span style="color:red;">{{ product|discount_price:sale|currency }}</span>
{% else %}
{{ product|discount_price:sale|currency }}
{% endif %}
"""
> Hello Scott, I was wondering did you manage to develop this template tag after all ? I am trying to implement sales for particular products without discount code too...
> On Wednesday, July 28, 2010 11:49:39 PM UTC+1, John-Scott wrote:
> On Jul 28, 5:41 pm, Brian Lee <ble...@gmail.com> 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.
> > 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.
> -- > You received this message because you are subscribed to the Google Groups "Satchmo users" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/satchmo-users/-/LAsanoCSTA0J.
> To post to this group, send email to satchmo-users@googlegroups.com.
> To unsubscribe from this group, send email to satchmo-users+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/satchmo-users?hl=en.
Thank you for your answer, I also found this solution by reading through the topics in the group - it is good for displaying the full price and then the discounted one. Nevertheless, my client wanted a more comprehensive way of creating sales from the admin panel - being able to create 'absolute amount off', 'percentage of'f' and multibuy sales from the type '3 for the price of 2' and being able to apply it to multiple products without having to open every product's edit page, so I ended up creating custom 'Sale' model that has a similar interface to 'Discount', but instead of messing with discounts, its save method creates such second prices for products, selected from a multi-choice checkbox widget. In order to connect the 'Sale' to the created second prices for further reference and CRUD operations, I subclassed the 'Price' model with my own 'SalePrice' that has a foreign key to Sale. So a new Sale creates SalePrices and they in turn create Price entries, while Satchmo's original models stay unmodified. If anybody needs any further details of how I did it, feel free to ask!
I would be interested to add your logic of code and I think that may help me in my current satchmo shop. Would it be possible for you to send me your code please ?
On Sunday, October 21, 2012 11:40:27 PM UTC+4, Stanislav Mihaylov wrote:
> Thank you for your answer, I also found this solution by reading through > the topics in the group - it is good for displaying the full price and then > the discounted one. > Nevertheless, my client wanted a more comprehensive way of creating sales > from the admin panel - being able to create 'absolute amount off', > 'percentage of'f' and multibuy sales from the type '3 for the price of 2' > and being able to apply it to multiple products without having to open > every product's edit page, so I ended up creating custom 'Sale' model that > has a similar interface to 'Discount', but instead of messing with > discounts, its save method creates such second prices for products, > selected from a multi-choice checkbox widget. In order to connect the > 'Sale' to the created second prices for further reference and CRUD > operations, I subclassed the 'Price' model with my own 'SalePrice' that has > a foreign key to Sale. So a new Sale creates SalePrices and they in turn > create Price entries, while Satchmo's original models stay unmodified. > If anybody needs any further details of how I did it, feel free to ask!
I am sorry for the late reply, I must have missed the email notification from your message. Do you still need my help? I am glad to help you, but please give me more details of what exactly do you need as functionality. Do you need just the models and admin code or also ideas of how to implement it in the template, displaying a product sale e.g.?
On Thursday, November 15, 2012 5:51:48 PM UTC, gg wrote:
> Hi
> I would be interested to add your logic of code and I think that may help > me in my current satchmo shop. Would it be possible for you to send me your > code please ?
> Thanking you in advance. > ++
> On Sunday, October 21, 2012 11:40:27 PM UTC+4, Stanislav Mihaylov wrote:
>> Thank you for your answer, I also found this solution by reading through >> the topics in the group - it is good for displaying the full price and then >> the discounted one. >> Nevertheless, my client wanted a more comprehensive way of creating sales >> from the admin panel - being able to create 'absolute amount off', >> 'percentage of'f' and multibuy sales from the type '3 for the price of 2' >> and being able to apply it to multiple products without having to open >> every product's edit page, so I ended up creating custom 'Sale' model that >> has a similar interface to 'Discount', but instead of messing with >> discounts, its save method creates such second prices for products, >> selected from a multi-choice checkbox widget. In order to connect the >> 'Sale' to the created second prices for further reference and CRUD >> operations, I subclassed the 'Price' model with my own 'SalePrice' that has >> a foreign key to Sale. So a new Sale creates SalePrices and they in turn >> create Price entries, while Satchmo's original models stay unmodified. >> If anybody needs any further details of how I did it, feel free to ask!
I would be highly obliged to get the codes and also the way to implement it in the template for displaying products. Presently I am running into couple of problems with the existing standard discounting module which has few bottlenecks.
As you said discounting is one entity, Sales across the shop is another entity like "Get3 if you buy 2" etc..I agree with you.
On Monday, November 26, 2012 9:23:08 PM UTC+4, Stanislav Mihaylov wrote:
> Hi,
> I am sorry for the late reply, I must have missed the email notification > from your message. Do you still need my help? I am glad to help you, but > please give me more details of what exactly do you need as functionality. > Do you need just the models and admin code or also ideas of how to > implement it in the template, displaying a product sale e.g.?
> On Thursday, November 15, 2012 5:51:48 PM UTC, gg wrote:
>> Hi
>> I would be interested to add your logic of code and I think that may help >> me in my current satchmo shop. Would it be possible for you to send me your >> code please ?
>> Thanking you in advance. >> ++
>> On Sunday, October 21, 2012 11:40:27 PM UTC+4, Stanislav Mihaylov wrote:
>>> Thank you for your answer, I also found this solution by reading through >>> the topics in the group - it is good for displaying the full price and then >>> the discounted one. >>> Nevertheless, my client wanted a more comprehensive way of creating >>> sales from the admin panel - being able to create 'absolute amount off', >>> 'percentage of'f' and multibuy sales from the type '3 for the price of 2' >>> and being able to apply it to multiple products without having to open >>> every product's edit page, so I ended up creating custom 'Sale' model that >>> has a similar interface to 'Discount', but instead of messing with >>> discounts, its save method creates such second prices for products, >>> selected from a multi-choice checkbox widget. In order to connect the >>> 'Sale' to the created second prices for further reference and CRUD >>> operations, I subclassed the 'Price' model with my own 'SalePrice' that has >>> a foreign key to Sale. So a new Sale creates SalePrices and they in turn >>> create Price entries, while Satchmo's original models stay unmodified. >>> If anybody needs any further details of how I did it, feel free to ask!