user1566100
user1566100

Reputation: 11

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

I'm new to WordPress and a very new to "shopp plugin", I want to select box that displays shipping method

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

This doesn't work. Please tell me in details about how to fetch this shipping method data using above code and where to look after the code for further changes to get the select box with details comes by OrderAmount-0, ItemQuantity-0 filling from [shipping menu] present in [system] side menu.

Upvotes: 0

Views: 164

Answers (1)

Domain
Domain

Reputation: 11808

Try this code:

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

Upvotes: 0

Related Questions