code: private function getHighlightFlag(Product $product)
      {
          foreach ($product->getBadges() as $badge) {
              if ($badge->getType() === Badge::TYPE_HIGHLIGHT) {
                  return 1;
              }
          }
  
          return 0;
      }
docs: @param Product $product
  
  @return int