Guest User

Untitled

a guest
Mar 26th, 2013
76
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php if ( shopp('shipping', 'has-options')): ?>
  2. <select name="shipmethod" class="shopp shipmethod">
  3. <?php while ( shopp('shipping','options')):
  4.  
  5. // add selected="selected" attribute to the option
  6. // if the current option is selected
  7. $selected = '';
  8. if (shopp('shipping','option-selected'))
  9. $selected = ' selected="selected"';
  10.  
  11. $value = shopp('shipping','get-option-slug');
  12. $name = shopp('shipping','get-option-name');
  13. $cost = shopp('shipping','get-option-cost');
  14. $delivery = shopp('shipping', 'get-option-delivery');
  15. $label = $name.' &mdash; '.$cost.' '.$delivery;
  16.  
  17. ?>
  18.  
  19. <option value="<?php echo $value; ?>"<?php echo $selected; ?> ><?php echo $label; ?></option>
  20.  
  21. <?php endwhile; ?>
  22. </select>
  23. <?php endif; ?>
  24. <?php endif; ?>
RAW Paste Data