SAVE 30% OFF on New Purchases, Renewals - No Minimum!
0
Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
You are here: HomeForum

We are here to serve :)

Our support team is currently online to solve your issues.

Our support team is currently offline

Our support heroes might not be around this hour. Please expect some delays.

Our support is available from

Monday - Friday 8am - 5:30pm GMT+7

Your time: 00:00:00
Our time: 00:00:00

Welcome, Guest

SJ Responsive Content for K2 and JComments problem
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: SJ Responsive Content for K2 and JComments problem

SJ Responsive Content for K2 and JComments problem 4 years, 7 months ago #21982

I use K2 and JComments + K2 JComments plugin on my blog. The number of comments for each item is working fine on core K2 pages (e.g. zatrzymujeczas.pl/warsztat/item/183-hdr-i-mapowanie-tonow-w-fotografii-reportazowej). But when I use SJ Responsive Content for K2, the number of comments is always 0 - have a look at this test page: zatrzymujeczas.pl/test . How can I fix that?

Re: SJ Responsive Content for K2 and JComments problem 4 years, 7 months ago #22052

  • yennt
  • OFFLINE
  • Moderator
  • Posts: 1365
  • Karma: 20
Dear cli,

Please feel free to submit a ticket and provide us your admin account.
We will check directly and reply you soon.

Thanks & regards!

Re: SJ Responsive Content for K2 and JComments problem 4 years, 7 months ago #22054

Hi Yennt,

OK, I submitted the ticket.

Re: SJ Responsive Content for K2 and JComments problem 4 years, 7 months ago #22221

Well, I figured out how to do it by myself. Maybe it's not the best solution, but it works.

So you have to edit this file: modules\mod_sj_k2_responsive_content\tmpl\default.php

Go to the line 179 and find this code:

<?php if($params->get('itemCommentsCounter',1) == 1) {?>
<span class="item-comment">
	<?php echo $item->numOfComments; ?>
	<span class="item-comment-bottom"></span>
</span>
<?php }?>


Replace it with:

<?php if($params->get('itemCommentsCounter',1) == 1) {?>
<span class="item-comment">
	<?php
	/**
	 * This section was added to enable use of JComments in Sj Responsive Content for K2
	 * Remember to install K2 JComments plugin first!
	 */
	$commentsAPI = JPATH_SITE . '/components/com_jcomments/jcomments.php';
	if (is_file($commentsAPI)) {
		require_once($commentsAPI);
		$count = JComments::getCommentsCount($item->id, 'com_k2');
		echo $count;}
	else {
		echo $item->numOfComments;} ?>
	<span class="item-comment-bottom"></span>
</span>
<?php }?>
Last Edit: 4 years, 7 months ago by cli.
The following user(s) said Thank You: thuygtn

Re: SJ Responsive Content for K2 and JComments problem 4 years, 7 months ago #22225

  • yennt
  • OFFLINE
  • Moderator
  • Posts: 1365
  • Karma: 20
Thank you for your suggestion
Best regards,
  • Page:
  • 1
Time to create page: 0.38 seconds

Notification

Please find your issue via Suggested Posts before submitting your question. We have solved the most of issues and maybe your issue was solved before.

Suggested Posts

(/)
Result not found!
SAVE 30% OFF on New Purchases, Renewals - No Minimum

Latest My Topics

No posts to display.

Love all our templates?

Join our membership clubs starting at $49 only for access to all of our templates

Join Now
Magento Themes Magento Extensions Free Magento Extensions Prestashop Themes Prestashop Modules Magento 2 Themes