[OJS 3.3.0-8] How to display download file count in Table Of Contents

Description of issue or problem I’m having:
Hello, I’ve tried to display the DOI, Abstract views count and Download count in Table of contents(OJS 3.3.0-8).
Both DOI and abstract views count were displayed correctly, But the Download count doesn’t display anything, see image below.
Screen Shot 2021-11-16 at 07.15.50
I want the file download count displayed on red box.

Steps I took leading up to the issue:
I followed the guide from this thread:
https://forum.pkp.sfu.ca/t/file-download-counter-in-ojs-3/61483/2

the video link on the thread is written on this webpage:
https://acahya.web.id/menambahkan-counter-statistik-jurnal-ojs-3-1-pada-table-of-content/
From the tutorial above, the download file count seems to only work in OJS 3.1.

This is the code i’ve tried on this case:
file: templates/frontend/objects/article_summary.tpl

{*Show abstract views count: it works*}
{translate key="article.abstract"} views: {$article->getViews()} , 

{*show file download count: it doesn't works*}
{if is_a($article, 'ArticleGalley')}{assign var=galleys value=$article->getGalleys()}
{/if}
{if $galleys}
	{foreach from=$galleys item=galley name=galleyList}
		{$galley->getGalleyLabel()} Downloaded = {$galley->getViews()} times
	{/foreach}
{/if}

I hope there is a solution for my problem. Thank you.

I use the following code for get article and PDF view count:
It works in OJS 3.3.0.8

{assign var=galleys value=$article->getGalleys()}
Görüntüleme: {$article->getViews()}
{if $galleys}
    {foreach from=$galleys item=galley name=galleyList}
       / İndirme: {$galley->getViews()}
    {/foreach}
{/if}
1 Like

Hi @kerimsarigul , I’m so sorry for my late response and thank you for your answer, your code works like charm on OJS 3.3.0.8. It also works on 3.3.0.11 version. I really appreciate that. :grinning:

1 Like