コード例 #1
0
ファイル: purchase.php プロジェクト: forthrobot/inuvik
 /**
  * Helper function that maps the current cart item's addons to the cart item's configured product menu options
  *
  * @internal
  * @since 1.3
  *
  * @param int $id The product ID to retrieve addon menus from
  * @return array A combined list of the menu labels list and addons menu map
  **/
 private static function _addon_menus()
 {
     return ShoppProductThemeAPI::_addon_menus(shopp('purchase.get-item-product'));
 }
コード例 #2
0
ファイル: cartitem.php プロジェクト: crunnells/shopp
 /**
  * Helper function that maps the current cart item's addons to the cart item's configured product menu options
  *
  * @internal
  * @since 1.3
  *
  * @param int $id The product ID to retrieve addon menus from
  * @return array A combined list of the menu labels list and addons menu map
  **/
 private static function _addon_menus()
 {
     return ShoppProductThemeAPI::_addon_menus(shopp('cartitem.get-product'));
 }
コード例 #3
0
ファイル: Main.php プロジェクト: TakenCdosG/chefs
 /**
  * Helper to display a product quantity selector.
  *
  * Working directly with shopp('product.quantity') will fail if the correct context is not set up, so we
  * will work directly with the underlying theme API methods.
  *
  * @param Product $product
  * @return string
  */
 public function quantity_selector(Product $product)
 {
     $quantity_options = apply_filters('shopptickets_quantity_selector_options', array('class' => 'selectall', 'input' => 'menu', 'options' => '0-15,20,25,30,40,50,75,100', 'value' => 0));
     $product_id = esc_attr($product->id);
     $product_ref = '<input type="hidden" name="products[' . $product_id . '][product]" value="' . $product_id . '" />';
     $selector = ShoppProductThemeAPI::quantity('', $quantity_options, $product);
     return $product_ref . $selector;
 }