Exemple #1
0
 /**
  * Provides a checkbox toggle to submit the address in the shipping address fields as the billing address
  *
  * @api `shopp('checkout.same-billing-address')`
  * @since 1.1
  *
  * @param string     $result  The output
  * @param array      $options The options
  * - **label**: `Same billing address` The label for the checkbox input
  * - **checked**: `on` (on, off) Specifies that an `<input>` element should be pre-selected when the page loads
  * - **class**: The class attribute specifies one or more class-names for an element
  * @param ShoppOrder $O       The working object
  * @return string The toggle markup
  **/
 public static function same_billing_address($result, $options, $O)
 {
     $allowed = array('class', 'checked');
     $defaults = array('label' => Shopp::__('Same billing address'), 'checked' => 'on', 'type' => 'billing', 'class' => '');
     $options = array_merge($defaults, $options);
     $options['type'] = 'billing';
     return ShoppCustomerThemeAPI::same_shipping_address($result, $options, $O);
 }