Answer the question
In order to leave comments, you need to log in
JCCatalogElement not found in product card?
Hello!
There was a problem in the classic Bitrix theme eshop_bootstrap_blue.
An error occurs in the product card in the console:
Uncaught ReferenceError: JCCatalogElement is not defined
Everything worked, I reset the cache and everything went wrong, and not all css are loaded either.
What could be causing the problem? Didn't make any edits to the thread.
I realized the problem is not loading files:
/bitrix/components/bitrix/catalog.element/templates/.default/script.js
What is the reason for this? I checked the rights everything is ok.
Answer the question
In order to leave comments, you need to log in
Although almost a year has passed, I have a possible solution for others looking for.
In my case, it was the error Uncaught TypeError: Cannot read property 'prototype' of undefined at Function.BX.extend
followed by errors like: Uncaught ReferenceError: JCCatalogTopSection is not defined
Almost the same thing - the purchase button through Bitrix scripts stops working.
Reason: one of the Bitrix javascript libraries was not loaded. There may be several reasons, for example, the library call code was in the cached area.
Specifically, in my case, the PHP script helped:
// Запускать скрипт надо перед вызовом компонента, в котором возникает ошибка (или в хеадере, если точно будет исопльзование данной библиотеки на всем сайте)
CJSCore::Init(array('popup'));
// Методом исключений можно оставить только необходимые
CJSCore::Init(array('ajax', 'json', 'ls', 'session', 'jquery', 'popup', 'pull'));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question