Display number of downloads
12 years 11 months ago #129400
by DeeEmm
Display number of downloads was created by DeeEmm
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->element->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
I would like to add it next to each file from within the "foreach ($this->element->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
Please Log in or Create an account to join the conversation.
12 years 11 months ago #129403
by DeeEmm
Replied by DeeEmm on topic Display number of downloads
NM. I've done it the old fashioned way.
Code:
$query = "SELECT `download_number` FROM `#__hikashop_download` WHERE `file_id` = '" . $file->file_id . "'";
$db->setQuery($query);
$downloads = $db->loadResult();
Please Log in or Create an account to join the conversation.
Time to create page: 0.162 seconds