====== Интеграция VirtueMart и JComments ====== ===== Задача ===== Нужно заменить стандартную систему комментариев VirtueMart на JComments ===== Пилим ===== Интеграция JComments в VirtueMart * Открываем файл /administrator/components/com_virtuemart/html/shop.product_details.php и заменяем: /*** Show all reviews available ***/ $product_reviews = ps_reviews::product_reviews( $product_id ); /*** Show a form for writing a review ***/ $product_reviewform = ps_reviews::reviewform( $product_id ); на следующее: $comments = $mosConfig_absolute_path . '/components/com_jcomments/jcomments.php'; if (file_exists($comments)) { require_once($comments); $product_reviews = JComments::showComments($product_id, 'com_virtuemart', $product_name); $product_reviewform = ""; } * Открываем файл /administrator/components/com_virtuemart/html/shop.browse.php и удаляем (комментируем) if (PSHOP_ALLOW_REVIEWS == '1' && @$_REQUEST['output'] != "pdf") { // Average customer rating: xxxxx // Total votes: x $product_rating = ps_reviews::allvotes( $db_browse->f("product_id") ); } else { $product_rating = ""; } * В настройках VirtueMart включить опцию «Enable Customer Review/Rating System» («Включить систему отзывов/опросов») {{tag>virtuemart jcomments joomla}}