0

私は WordPress と "shopp プラグイン" を初めて使用します。配送方法を表示するボックスを選択したい

shopp('shipping', 'option-menu', 'difference=on');

これはうまくいきません。上記のコードを使用してこの配送方法のデータを取得する方法と、[shipping menu] にある [shipping menu] から OrderAmount-0、ItemQuantity-0 を入力して詳細を含む選択ボックスを取得するためのコードをさらに変更する場所を詳しく教えてください。 【システム】サイドメニュー。

4

1 に答える 1

0

このコードを試してください:

<?php if ( shopp('shipping', 'has-options') ): ?>
    <?php while ( shopp('shipping','options')): 
    $selected = ''; 
    if ( shopp('shipping','option-selected') ) 
        $selected = ' selected="selected"';
    $value = shopp('shipping','get-option-slug');
    $name = shopp('shipping','get-option-name');
    $cost = shopp('shipping','get-option-cost);
    $delivery = shopp('shipping', 'get-option-delivery');
    $label = $name.' &mdash '.$cost.' '.$delivery;
    ?>

    <select name="shipmethod" class="shopp shipmethod">
    <option value="<?php echo $value; ?>"<?php echo $selected; ?> ><?php echo $label; ?></option>
    </select>

    <?php endwhile; ?>
    <?php endif; ?>
于 2015-05-26T12:48:00.063 に答える