Ejemplo n.º 1
0
 /**
  * Generates shipping method type list
  *
  * @param string The value of the HTML name attribute
  * @param string Additional HTML attributes for the <select> tag
  * @param mixed The key that is selected
  * @returns string HTML for the radio list
  */
 public static function shippingtype($selected, $name = 'filter_shipping_method_type', $attribs = array('class' => 'inputbox'), $idtag = null, $allowAny = false, $title = 'J2STORE_SELECT_SHIPPING_TYPE')
 {
     $list = array();
     if ($allowAny) {
         $list[] = self::option('', "- " . JText::_($title) . " -");
     }
     require_once JPATH_ADMINISTRATOR . '/components/com_j2store/library/shipping.php';
     $items = J2StoreShipping::getTypes();
     foreach ($items as $item) {
         $list[] = JHTML::_('select.option', $item->id, $item->title);
     }
     return self::genericlist($list, $name, $attribs, 'value', 'text', $selected, $idtag);
 }