code: def getSelectedTemplate(self, default="Code_39_40x20mm.pt"):
          
          # Default sticker
          bs_template = self.context.bika_setup.getAutoStickerTemplate()
          size = self.request.get("size", "")
  
          if self.filter_by_type:
              templates = getStickerTemplates(filter_by_type=self.filter_by_type)
              # Get the first sticker
              bs_template = templates[0].get("id", "") if templates else ""
          elif size == "small":
              bs_template = self.context.bika_setup.getSmallStickerTemplate()
          elif size == "large":
              bs_template = self.context.bika_setup.getLargeStickerTemplate()
          rq_template = self.request.get("template", bs_template)
          # Check if the template exists. If not, fallback to default's
          # 'prefix' is also the resource folder's name
          prefix = ""
          templates_dir = ""
          if rq_template.find(":") >= 0:
              prefix, rq_template = rq_template.split(":")
              templates_dir = self._getStickersTemplatesDirectory(prefix)
          else:
              this_dir = os.path.dirname(os.path.abspath(__file__))
              templates_dir = os.path.join(this_dir, "templates/stickers/")
              if self.filter_by_type:
                  templates_dir = templates_dir + "/" + self.filter_by_type
          if not os.path.isfile(os.path.join(templates_dir, rq_template)):
              rq_template = default
          return "%s:%s" % (prefix, rq_template) if prefix else rq_template
docs: Returns the id of the sticker template selected.
  
          If no specific template found in the request (parameter template),
          returns the default template set in Setup > Stickers.
  
          If the template doesn't exist, uses the default template.
  
          If no template selected but size param, get the sticker template set as
          default in Bika Setup for the size set.