old_contents: from django import template
  from django.conf import settings
  from django.core import urlresolvers
  from django.template import Context, Template
  from django.utils.translation import get_language, ugettext_lazy as _
  from satchmo.configuration import config_value
  from satchmo.product.models import Category
  from satchmo.shop.templatetags import get_filter_args
  
  register = template.Library()
  
  def is_producttype(product, ptype):
      """Returns True if product is ptype"""
      if ptype in product.get_subtypes():
          return "true"
      else:
          return ""
  
  register.filter('is_producttype', is_producttype)
  
  def product_images(product, args=""):
      args, kwargs = get_filter_args(args, 
          keywords=('include_main', 'maximum'), 
          boolargs=('include_main'),
          intargs=('maximum'),
          stripquotes=True)
  
      q = product.productimage_set
      if kwargs.get('include_main', True):
          q = q.all()
      else:
          main = product.main_image
          q = q.exclude(id = main.id)
      
      maximum = kwargs.get('maximum', -1)
      if maximum>-1:
          q = list(q)[:maximum]
      
      return q
  
  register.filter('product_images', product_images)
  
  def smart_attr(product, key):
      """Run the smart_attr function on the spec'd product
      """
      return product.smart_attr(key)
      
  register.filter('smart_attr', smart_attr)
  
new_contents: from django import template
  from django.conf import settings
  from django.core import urlresolvers
  from django.template import Context, Template
  from django.utils.translation import get_language, ugettext_lazy as _
  from satchmo.configuration import config_value
  from satchmo.product.models import Category
  from satchmo.shop.templatetags import get_filter_args
  
  register = template.Library()
  
  def is_producttype(product, ptype):
      """Returns True if product is ptype"""
      if ptype in product.get_subtypes():
          return True
      else:
          return False
  
  register.filter('is_producttype', is_producttype)
  
  def product_images(product, args=""):
      args, kwargs = get_filter_args(args,
          keywords=('include_main', 'maximum'),
          boolargs=('include_main'),
          intargs=('maximum'),
          stripquotes=True)
  
      q = product.productimage_set
      if kwargs.get('include_main', True):
          q = q.all()
      else:
          main = product.main_image
          q = q.exclude(id = main.id)
  
      maximum = kwargs.get('maximum', -1)
      if maximum>-1:
          q = list(q)[:maximum]
  
      return q
  
  register.filter('product_images', product_images)
  
  def smart_attr(product, key):
      """Run the smart_attr function on the spec'd product
      """
      return product.smart_attr(key)
  
  register.filter('smart_attr', smart_attr)
  
subject: Change the is_producttype template tag to return a boolean rather than a string.