public function getJs($position)
    {
        $js = $this->asset->get('js', $position);

        if (isset($js['js_settings']['asset'])) {
            $json = gplcart_json_encode($js['js_settings']['asset']);
            $js['js_settings']['asset'] = "Gplcart.settings=$json;";
        }

        return $js;
    }
public function getJs($position)
    {
        $js = $this->asset->get('js', $position);

        if (isset($js['js_settings']['asset'])) {
            $json = gplcart_json_encode($js['js_settings']['asset']);
            $js['js_settings']['asset'] = "Gplcart.settings=$json;";
        }

        return $js;
    }
public function getJs ( $ position ) { $ js = $ this -> asset -> get ( 'js' , $ position ) ; if ( isset ( $ js [ 'js_settings' ] [ 'asset' ] ) ) { $ json = gplcart_json_encode ( $ js [ 'js_settings' ] [ 'asset' ] ) ; $ js [ 'js_settings' ] [ 'asset' ] = "Gplcart.settings=$json;" ; } return $ js ; }
Returns an array of JS scripts
@param string $position
@return array
Returns an array of JS scripts