Template tags for new arrivals and featured products

Issue #1206 resolved
Anonymous created an issue

tags i think should be added to the core:

@register.inclusion_tag('shop/new_arrivals.html') def show_new_arrivals(number): new_arrivals = Product.objects.all().order_by('date_added')[:number] return {'new_arrivals': new_arrivals}

@register.inclusion_tag('shop/featured_items.html') def show_featured_items(number): featured_items = Product.objects.filter(featured=True)[:number] return {'featured_items': featured_items}

if this is in the wrong place, kindly excuse.

Comments (2)

  1. Chris Moffitt repo owner

    I think it would make sense to add these as examples in the satchmo documentation. If you have the example html files, please attach them and I'll add them into the documentation.

    I do think this would be a good example so please attach your thoughts on documenting and I'll make any edits that we need to.

  2. Log in to comment