0

I've created custom .phtml file in app/code/Trustmate/Opinions/templates/trustmatewidget.phtml

Here I add a short link to the .js code called code from URL with reviews slider on the bottom page.

Then I created a new block:

<p>{{block class="Magento\Framework\View\Element\Template" template="TrustMate_Opinions::trustmatewidget.phtml"}}</p>

Now I refresh the page. The widget appears on the frontend, but there is some conflict with javascript throughout the store. Example no-load slider products etc.

But this is very strange: I refresh the page and one time work, and then in second refresh no work.

Depending on the refresh, sometimes it is possible to load correctly all the js elements of the page and sometimes there is a problem as shown in the attached screenshots. Js console points to

Uncaught TypeError: wrapper.wrapSuper is not a function

 at jquery-mixin.js: 14
 at mixins.js: 105
 at Array.forEach (<anonymous>)
 at applyMixins (mixins.js: 104)
 at mixins.js: 129
 at Object.execCb (require.js: 1650)
 at Module.check (require.js: 866)
 at Module. <anonymous> (require.js: 1113)
 at require.js: 132
 at require.js: 1156

Below screen: enter image description here

enter image description here website url: https://nansy.pl/

Can anyone help me debug this?

1 Answer 1

0
  1. Copy the <carousel_name>.carousel.js file to the app/design/frontend/<package_name>/<theme_name>/web/js/<carousel_name>/ directory.
  2. Add your RequireJS module at app/design/frontend/<package_name>/<theme_name>/web/js/carousel.js.

define(['jquery','<carousel_name>'], function($)

{
    return function(config, element)
    {
        $(element).<carousel_name>(config);
    };
});

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.