How to add download file "Description" field to customer's product Download list

  • Posts: 14
  • Thank you received: 1
6 years 8 months ago #274497

-- HikaShop version -- : 3.1.1
-- Joomla version -- : 3.7.3
-- PHP version -- : 5.6.3
-- Browser(s) name and version -- : Firefox, Safari

In the customer's Download page, a customer can access their download files for the products they purchased. Currently the table lists the following fields:

Product Files Number of Download Download Number Limit First Purchased at Last Purchased at

I would like to add the Description field to this table. This is the Description field that I specify when I click "Add File" icon for a particular downloadable product that involves various downloadable files. That dialog box, presents entry fields for Name, Set file mode, File, Download number limit, Free Download, and Description. This is the Description field I would like to include in the customer's Product Download list table.

In the Views section, I see there is a download.php file that perhaps can be modified. And it has the following in it for the Downloads table:

<tr>
<th class="hikashop_product_name title"><?php
echo JHTML::_('grid.sort', JText::_('PRODUCT'), 'op.order_product_name', $this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value );
?></th>
<th class="hikashop_file_name title"><?php
echo JHTML::_('grid.sort', JText::_('HIKA_FILES'), 'f.file_name', $this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value );
?></th>
<th class="hikashop_nb_download title"><?php
echo JText::_('NB_DOWNLOADED');
?></th>
<th class="hikashop_download_limit title"><?php
echo JHTML::_('grid.sort', JText::_('DOWNLOAD_NUMBER_LIMIT'), 'f.file_limit', $this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value );
?></th>
<th class="hikashop_order_date_title title"><?php
echo JHTML::_('grid.sort', JText::_('FIRST_PURCHASED_AT'), 'min_order_created', $this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value );
?></th>
<th class="hikashop_order_date_title title"><?php
echo JHTML::_('grid.sort', JText::_('LAST_PURCHASED_AT'), 'max_order_created', $this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value );
?></th>
</tr>


Can I include the download file 'Description' field there, and if so, what is the code, or field name to use?

Thank you so much for your help.

Please Log in or Create an account to join the conversation.

  • Posts: 81483
  • Thank you received: 13062
  • MODERATOR
6 years 8 months ago #274506

Hi,

If you look below that code in that file, you can see that the file name is accessed with the code:
$downloadFile->file_name
So for the description, you can use such code:
<?php echo $downloadFile->file_description; ?>

The following user(s) said Thank You: TheSiriusLibrary

Please Log in or Create an account to join the conversation.

Time to create page: 0.057 seconds
Powered by Kunena Forum