php Shopware 5 Styla插件 - 没有卷曲黑客

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php Shopware 5 Styla插件 - 没有卷曲黑客相关的知识,希望对你有一定的参考价值。

    public function postDispatch(){

        $type = $this->_feed_params['type'];
        $js_include = StylaUtils::getJsEmbedCode($this->_username, $this->_snippet_url);

        $ret = null;

        $path = StylaUtils::getCurrentPath($this->_base_dir);
        //disabling call to SEO API
        //$ret = StylaUtils::getRemoteContent($this->_username, $path, $this->_url_query_params, $this->_source_url);

        $custom_page = $this->View()->getAssign('sCustomPage');
        if($ret){
            $custom_page['head_content'] = $ret['head_content'];
            $custom_page['page_title'] = $ret['page_title'];
            $custom_page['meta_description'] = $ret['meta_description'];
            $custom_page['query_params'] = $ret['query_params'];
            $stylaDiv = '<div id="stylaMagazine" data-magazinename="'.$this->_username.'" data-rootpath="'.$this->_base_dir.'"></div>';
            $this->View()->assign('sContent', $ret['noscript_content']."\r\n".$js_include."\r\n".$stylaDiv);
            $status_code = $ret['status_code'];
        }
        //since we disabled SEO API call, providing just the basic content
        else {
            $stylaDiv = '<div id="stylaMagazine" data-magazinename="'.$this->_username.'" data-rootpath="'.$this->_base_dir.'"></div>';
            $this->View()->assign('sContent', $js_include."\r\n".$stylaDiv);
            $status_code = 200;
        }

        $this->View()->assign('sCustomPage', $custom_page);
        $this->View()->assign('feed_type', $type);
        $this->Response()->setHttpResponseCode($status_code);
    }

以上是关于php Shopware 5 Styla插件 - 没有卷曲黑客的主要内容,如果未能解决你的问题,请参考以下文章

Shopware 6:在自己的自定义管理模块中获取 PHP 数据

Shopware 5 在模板文件中调用自定义函数

Shopware6:缺少插件配置

将 s_categories 表从数据库拉到 shopware 5 中的 someone.tpl

shopware 6插件的单元测试未找到自定义服务

Shopware 6 - 插件配置中的字段验证不起作用