Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

How To Get Pages Post / Comment Count Rate Topic   - - - - -

 
  • hostandname
  • Senior Member
  • Members
  • Join Date: 05-Jan 06
  • 199 posts

Posted 02 October 2015 - 06:30 PM #1

Hi everyone,

 

Does anyone know how i can get a pages / posts total amount of comments to display the number of comments on the post?

 

Thanks in advance


Host & Name Ltd - your reliable & trustworthy media provider (www.hostandname.co.uk)
Approved CS-Cart Developers and Official CS-Cart Licensing Supplier
Web Hosting | Cloud Hosting | Dedicated Servers | VPS | Domains | Emails | Design | Development | Marketing | Management


 
  • The Tool
  • Been Here Way Too Long Member
  • Members
  • Join Date: 30-Mar 07
  • 3917 posts

Posted 02 October 2015 - 07:22 PM #2

Add-ons->Manage add-ons->Comments and reviews->Pages



 
  • hostandname
  • Senior Member
  • Members
  • Join Date: 05-Jan 06
  • 199 posts

Posted 03 October 2015 - 08:43 AM #3

I need to display the count of how many comments there are for a post like "Comments (2)" for example, i tried using this but always shows 0

{$subpage.discussion.posts|count}

Host & Name Ltd - your reliable & trustworthy media provider (www.hostandname.co.uk)
Approved CS-Cart Developers and Official CS-Cart Licensing Supplier
Web Hosting | Cloud Hosting | Dedicated Servers | VPS | Domains | Emails | Design | Development | Marketing | Management


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11660 posts

Posted 04 October 2015 - 12:37 AM #4

And if you did:

<!-- pages: {$subpage.discussion.posts|print_r:true} -->

Does it show that you have array elements in $subpage.discussion.posts?


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 20773 posts

Posted 05 October 2015 - 08:57 AM #5

Please clarify where do you want to display the amount of comments?


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • hostandname
  • Senior Member
  • Members
  • Join Date: 05-Jan 06
  • 199 posts

Posted 05 October 2015 - 09:47 AM #6

Please clarify where do you want to display the amount of comments?

 

So there are 2 pages for example: blog list and blog single - i want to showing the amount of comments for each post on the blog list page.


Host & Name Ltd - your reliable & trustworthy media provider (www.hostandname.co.uk)
Approved CS-Cart Developers and Official CS-Cart Licensing Supplier
Web Hosting | Cloud Hosting | Dedicated Servers | VPS | Domains | Emails | Design | Development | Marketing | Management


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11660 posts

Posted 05 October 2015 - 07:26 PM #7

Did you try what I suggested above to see what the results are?  That will at least tell you if you have data in the variables you are expecting it in.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 20773 posts

Posted 06 October 2015 - 09:32 AM #8

I am afraid, amount of comments is not get from DB for the list of posts. So additional code modifications are required to do it


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)