Answer the question
In order to leave comments, you need to log in
Bitrix scripts do not work when calling catalog.element in a modal window. Where to dig?
The task seemed initially simple, but I suddenly ran into a problem.
It was only necessary to do some quick viewing of the product card. I made the view button a link to the quick_view.php file in which I called bitrix:catalog.element. arParams was pulled directly from the call to the complex directory in order to immediately be sure that the parameters of the call to the normal view and the quick view will be the same. Do not work, as I understand it, some scripts. When we try to add to cart we see in the console. (unknown) Uncaught ReferenceError: JCCatalogProductSubscribe is not defined
And when trying to switch the size or color of the product, we get Uncaught TypeError: Cannot read property 'setCurrencies' of undefined
What do you say?
Answer the question
In order to leave comments, you need to log in
script.js is not connected from the component, it automatically pulls up when the component is called on the page (the ShowHead function displays scripts, and it has already worked for you for a long time, when forming the page), connect manually, there are many options how to do this
As far as I understand, you did the loading of what is in quick_view.php through JQuery. But there is no JCCatalogProductSubscribe description on the page, so just try to copy the JCCatalogProductSubscribe description from bitrix:catalog.element in the main component template JS (most likely bitrix:catalog.section).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question