Exemple #1
0
 /**
  * Provides the authoritative Theme API context
  *
  * @internal
  * @since 1.2
  *
  * @return string The Theme API context name
  */
 public static function _apicontext()
 {
     if (null === self::$addresses) {
         self::$addresses = array('billing' => ShoppOrder()->Billing, 'shipping' => ShoppOrder()->Shipping);
     }
     return 'customer';
 }
Exemple #2
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);
 }