[Skip to main content](#vessel-content)

#   Display number of downloads

##

- **[DeeEmm](/forum/user/26410-deeemm "View DeeEmm's Profile")**
- [![DeeEmm's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar26410.jpg)](/forum/user/26410-deeemm "View DeeEmm's Profile") Topic Author
- [ Offline](/forum/user/26410-deeemm)

Less More

- Posts: 114
- Thank you received: 14
-
- [](http://deeemm.com)
-

13 years 2 weeks ago [\#129400](#129400) by [DeeEmm](/forum/user/26410-deeemm "View DeeEmm's Profile")  *[Display number of downloads](/forum/31-development/863091-display-number-of-downloads#129400 "How can I get the number of downloads for each file within &quot;product / show&#95;block&#95;product&#95;files&quot;.  I would like to add it next to each file from within the &quot;foreach ($this-&gt;element-&gt;files as $file) {&quot; loop  I notice that the number of downloads is stored within #&#95;&#95;hikashop&#95;download table and does not seem to be available via the class properties. Are there any methods available to give me the number of downloads  TIA  /DM")* was created by *[DeeEmm](/forum/user/26410-deeemm "View DeeEmm's Profile")*

How can I get the number of downloads for each file within "product / show_block_product_files".

I would like to add it next to each file from within the **"foreach ($this-&gt;element-&gt;files as $file) {"** loop

I notice that the number of downloads is stored within #__hikashop_download table and does not seem to be available via the class properties. Are there any methods available to give me the number of downloads

TIA

/DM

---

[ deeemm.com](http://deeemm.com)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg2MzA5MS1kaXNwbGF5LW51bWJlci1vZi1kb3dubG9hZHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[DeeEmm](/forum/user/26410-deeemm "View DeeEmm's Profile")**
- [![DeeEmm's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar26410.jpg)](/forum/user/26410-deeemm "View DeeEmm's Profile") Topic Author
- [ Offline](/forum/user/26410-deeemm)

Less More

- Posts: 114
- Thank you received: 14
-
- [](http://deeemm.com)
-

13 years 2 weeks ago [\#129403](#129403) by [DeeEmm](/forum/user/26410-deeemm "View DeeEmm's Profile")  Replied by *[DeeEmm](/forum/user/26410-deeemm "View DeeEmm's Profile")* on topic *[Display number of downloads](/forum/31-development/863091-display-number-of-downloads#129403 "How can I get the number of downloads for each file within &quot;product / show&#95;block&#95;product&#95;files&quot;.  I would like to add it next to each file from within the &quot;foreach ($this-&gt;element-&gt;files as $file) {&quot; loop  I notice that the number of downloads is stored within #&#95;&#95;hikashop&#95;download table and does not seem to be available via the class properties. Are there any methods available to give me the number of downloads  TIA  /DM")*

NM. I've done it the old fashioned way.
Code:

$query = "SELECT &#96;download_number&#96; FROM &#96;#__hikashop_download&#96; WHERE &#96;file_id&#96; = '" . $file-&gt;file_id . "'"; $db-&gt;setQuery($query); $downloads = $db-&gt;loadResult();

---

[ deeemm.com](http://deeemm.com)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg2MzA5MS1kaXNwbGF5LW51bWJlci1vZi1kb3dubG9hZHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.041 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
