---
title: "Commerce Searchの結果レンダリングをカスタマイズして商品バンドルを特定できます"
slug: "customize-the-commerce-search-results-rendering-to-identify-product-bundles"
abstract: "Commerce Search Results Scribanテンプレートをカスタマイズし、検索結果で製品バンドルがラベルで識別されるようにする方法。"
---
# Commerce Searchの結果レンダリングをカスタマイズして商品バンドルを特定できます

Commerce Search Results Scribanテンプレートを修正して、例えば製品バンドル用の*Bundle*タグを追加するために出力をカスタマイズできます。

![Example of a Bundle label on the live storefront.](https://doc.sitecore.com/api/markdown-image/xp/ja/developers/102/sitecore-experience-commerce/images/BundleLabel.png)

商品バンドルを識別するためのカスタムラベルを追加するには:

1.  コンテンツエディターで */sitecore/Content///Storefront Dictionary*へ行ってください。
    
2.  Commerce **Search Results**を右クリックし、「 **Insert」、辞書エントリ**をクリックします。
    
3.  **メッセージ**ダイアログボックスでラベルを入力してください。例えば*Bundle Label*、**をクリック。**
    
4.  **コンテンツ**タブの**「データ**」セクションの**キー**フィールドで、ラベルに関連付けられたいキーの名前を入力します。例えば*BUNDLE\_LABEL*。
    
5.  **Phrase**欄に表示したいフレーズ(例えば*Bundle*)を入力し、変更を保存します。
    
6.  Commerce Search Results Scribanテンプレートを変更するには、コンテンツエディターで */sitecore/Content///Presentation/Rendering Variants/Commerce Search Results/Default/Scriban*へ行ってください。
    
7.  **コンテンツ**タブの**VariantDetails**セクションの**テンプレート**フィールドで、行 <div data-bind="css: { 'promotion': promotion }"の前に以下のコードを挿入します。
    
    {{ if string.contains i\_item.template\_name 'Bundle' }}
     <div data-bind="css: { 'promotion': promotion }" class="promotion">
     <span class="savings-label">{{ sc\_translate 'BUNDLE\_LABEL' }}</span>
     </div>
     {{ end }}
    
8.  リボンの上で「 **保存**」をクリックします。
    
9.  F9を押して変更を公開してください。