wordpress 中的 Shopp 插件 - 显示 select 运输方式框

Shopp plugin in wordpress -to display select box of shipping method

我是 WordPress 的新手,也是 "shopp plugin" 的新手, 我想要 select 显示运输方式的框

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

这行不通。请详细告诉我如何使用上面的代码获取此送货方式数据,以及在哪里查看代码以进行进一步更改以获取 select 框,详细信息来自 [shipping] 的 OrderAmount-0,ItemQuantity-0 填充menu] 出现在 [system] 侧面菜单中。

试试这个代码:

<?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; ?>