/** * Returns the requested shipping method object * * @param $id * @return object */ public static function getType($id) { $items = CitruscartHelperShipping::getTypes(); return $items[$id]; }
/** * 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 = 'Select Shipping Type') { $list = array(); if ($allowAny) { $list[] = self::option('', "- " . JText::_($title) . " -"); } Citruscart::load('CitruscartHelperShipping', 'helpers.shipping'); $items = CitruscartHelperShipping::getTypes(); foreach ($items as $item) { $list[] = JHTML::_('select.option', $item->id, $item->title); } return self::genericlist($list, $name, $attribs, 'value', 'text', $selected, $idtag); }