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