1

I have created a custom theme on shopware5 using the "Bare" theme as the parent theme. I have added "Jquery" library on my theme.

However, I am getting "TypeError: jQuery.subscribe is not a function" Error when I load some pages on the site.

I can see there is no such an issue when I switch back to the Responsive theme.

I need to use a image zoom plugin on my detail page but I am unable to setup the plugin because of this issue.

4

1 回答 1

0

您的 JS 文件应包含在主题的 Theme.php 文件中。例子:

protected $extend = 'Responsive';
... 
protected $javascript = array(
        'src/js/jquery.my-js-file.js',
    );
...
protected $name = <<<'SHOPWARE_EOD' ...

然后你应该清除缓存并编译你的主题。之后,您可以使用您的库。

于 2016-02-22T10:18:52.783 回答