• プラグイン一覧
    - WCEX Item Combo Set
    - WCEX Amazon Pay
    - WCEX Wishlist お気に入りリスト
  • リリース情報
  • お役立ちコラム
  • お問い合わせ
  • サポート
    • よくある質問
      • WCEX Amazon Pay
      • WCEX Wishlist お気に入りリスト
      • wcex-item-combo-set
    • リファレンス
      • WCEX Amazon Pay
      • WCEX Wishlist お気に入りリスト
      • wcex-item-combo-set
新規会員登録
ログイン
新規会員登録
ログイン
カート
  • プラグイン一覧
    • - WCEX Item Combo Set
    • - WCEX Amazon Pay
    • - WCEX Wishlist お気に入りリスト
  • リリース情報
  • お役立ちコラム
  • サポート
    • - よくある質問
      • - WCEX Amazon Pay
      • - WCEX Wishlist お気に入りリスト
      • - wcex-item-combo-set
    • - リファレンス
      • - WCEX Amazon Pay
      • - WCEX Wishlist お気に入りリスト
      • - wcex-item-combo-set
  • お問い合わせ
Aivec APPs > wcex-item-combo-set > ファンクション > wcexics_get_group_form
レファレンス
バージョン
1.0.6
絞り込み:

目次

  • パラメータ
  • 戻り値
  • ソース
  • 関連アイテム
    • 使用するアイテム
    • 使用されるアイテム

フック

  • アクション
  • フィルター

ファンクション

    ファンクション

    wcexics_get_group_form( Aivec\Welcart\Extensions\ItemComboSet\Types\ComboGroup $group )

    Returns HTML for a combo group

    パラメータ #パラメータ

    $group

    (ComboGroup) (必須)


    戻り値 #戻り値

    Top ↑

    (文字列)

    ソース #ソース

    Top ↑

    ファイル: src/template-functions.php

    function wcexics_get_group_form(ComboGroup $group) {
        $session = !empty($_SESSION['wcexicsGroupToItemMap']) ? (array)$_SESSION['wcexicsGroupToItemMap'] : [];
        $unsanitized = !empty($session[$group->getId()]) ? $session[$group->getId()] : [];
        unset($_SESSION['wcexicsGroupToItemMap'][$group->getId()]);
        // sanitize selections
        $selection = [];
        foreach ($unsanitized as $selval) {
            $selection[] = (int)$selval;
            if ($selval !== -1) {
                $selection[] = $selval;
            }
        }
        $items = $group->getItems();
        if (empty($items)) {
            return '';
        }
    
        ob_start();
        ?>
        <div class="combo-set-form__group-label">
            <?php
            echo $group->getLabel();
            if ($group->getOptional() === false) {
                echo '<em>' . __('*', 'usces') . '</em>';
            }
            ?>
        </div>
        <?php
        $labelhtml = (string)ob_get_clean();
        $hookargs = [
            'sessionSelections' => $selection,
            'groupItems' => $items,
            'group' => $group,
        ];
        $labelhtml = apply_filters('wcexics_filter_group_label_html', $labelhtml, $hookargs);
    
        return $labelhtml . wcexics_get_items_form($group, $items, $selection);
    }
    

    ソースを伸ばす ソースを縮める


    関連アイテム #関連アイテム

    Top ↑

    使用するアイテム #使用するアイテム

    使用するアイテム
    説明
    src/template-functions.php: wcexics_get_items_form() Returns form HTML for a groups’ items
    src/template-functions.php: wcexics_filter_group_label_html

    使用されるアイテム #使用されるアイテム

    Top ↑

    使用されるアイテム説明
    src/template-functions.php: wcexics_get_combo_set_form() Returns combo-set item page form HTML

    • 新規会員登録
    • ログイン
      • プラグイン一覧
      • 会社概要
      • リリース情報
      • よくある質問
      • お役立ちコラム
      • お問い合わせ
      • 個人情報保護方針
      • 特定商取引法に基づく表記
      • 情報セキュリティ基本方針
      • 利用規約

    アイベック合同会社は「Welcart」「Amazon Pay」の公式パートナーです。

    ※Amazon、Amazon.co.jp、Amazon Payおよびそれらのロゴは、Amazon.com,inc.またはその関連会社の商標です。

    © 2025 Aivec llc All Rights Reserved.