php - joomla: adding a select.optgroup to select.genericlist -


i need add select.optgroup select.genericlist, code:

foreach ($this->methods $method) {       if ($this->checkconditions($cart, $method, $cart->pricesunformatted)) {           $methodsalesprice = $this->calculatesalesprice($cart, $method, $cart->pricesunformatted);           $method->$method_name = $this->renderpluginname($method);                $session = jfactory::getsession();               $htmli[] = $this->getpluginhtml($method, $selected, $methodsalesprice);               // attempt               $htmli[] = jhtml::_('select.optgroup', 'my optgroup');               // attempt ends here               $htmli[] = jhtml::_('select.genericlist', $this->banks, 'service_issuer', 'size=1', 'key', 'value', $session->get('service_issuer', 0, 'vm'));               $html[] = $htmli;         }   } 

this returns following:

array 

has done before? advice appreciated

i've managed fix myself, below working code

if($method->payment_method == "mymethod") {               $session = jfactory::getsession();               $htmli = $this->getpluginhtml($method, $selected, $methodsalesprice);               $banksera[] = jhtml::_('select.option', '', jtext::_('vmpayment_banks'));               $banksera[] = jhtml::_('select.optgroup', 'countries');               foreach ($this->banksera $key => $value) {                 $banksera[] = jhtml::_( 'select.option', $key, $value );               }               $htmli .= jhtml::_('select.genericlist', $banksera, 'issuer', 'class="inputbox"', 'value', 'text', $session->get('issuer', 0, 'vm'));               $html[] = $htmli;           } 

Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -