- Posts: 27
- Thank you received: 1
Paid for file creating BR and leaving gap on product page
9 years 9 months ago #257514
by mikeflan
-- HikaShop version -- : 2.6.4
-- Joomla version -- : 3.6.4
-- PHP version -- : 5.4.45-0+deb7u5
-- Browser(s) name and version -- : Chrome 54.0.2840.99
I have a product which has 12 paid for files and one free file. On the product page in the downloads section, it does not show the paid for items but inserts a BR tag for each one leading to a large gap on the page.
1st attached picture is a screen shot of the our page with showing inspect screen with 12 BR tags after the file.
2nd attached picture is the section of code causing the BR tags to appear. If removed then all files appear on the same line.
Can this be moved so that the BR tags are only shown when the file is available to download.
If you need any more information, please let me know
Thanks mike
-- Joomla version -- : 3.6.4
-- PHP version -- : 5.4.45-0+deb7u5
-- Browser(s) name and version -- : Chrome 54.0.2840.99
I have a product which has 12 paid for files and one free file. On the product page in the downloads section, it does not show the paid for items but inserts a BR tag for each one leading to a large gap on the page.
1st attached picture is a screen shot of the our page with showing inspect screen with 12 BR tags after the file.
2nd attached picture is the section of code causing the BR tags to appear. If removed then all files appear on the same line.
Can this be moved so that the BR tags are only shown when the file is available to download.
If you need any more information, please let me know
Thanks mike
Please Log in or Create an account to join the conversation.
9 years 9 months ago #257516
by nicolas
Replied by nicolas on topic Paid for file creating BR and leaving gap on product page
Hi,
Nice catch. Thanks for the feedback !
Change the foreach code to:
and it will fix that.
Nice catch. Thanks for the feedback !
Change the foreach code to:
Code:
foreach ($this->element->files as $file) {
if (empty ($file->file_name)) {
$file->file_name = $file->file_path;
}
if (empty ($file->file_free_download))
continue;
$html[] = '<a class="hikashop_product_file_link" href="' . hikashop_completeLink('product&task=download&file_id=' . $file->file_id.$url_itemid) . '">' . $file->file_name . '</a><br/>';
}
Please Log in or Create an account to join the conversation.
9 years 9 months ago #257608
by mikeflan
Replied by mikeflan on topic Paid for file creating BR and leaving gap on product page
That worked but I had to remove the the <br/> at the end of line 35, otherwise I would get to BR tags between two free downloads links
35 $html[] = '<a class="hikashop_product_file_link" href="' . hikashop_completeLink('product&task=download&file_id=' . $file->file_id.$url_itemid) . '">' . $file->file_name . '</a>';
Thanks for the help
Mike
35 $html[] = '<a class="hikashop_product_file_link" href="' . hikashop_completeLink('product&task=download&file_id=' . $file->file_id.$url_itemid) . '">' . $file->file_name . '</a>';
Thanks for the help
Mike
Please Log in or Create an account to join the conversation.
9 years 9 months ago #257614
by nicolas
Replied by nicolas on topic Paid for file creating BR and leaving gap on product page
Hi,
Ah yes, thanks ! We'll fix that too.
Ah yes, thanks ! We'll fix that too.
Please Log in or Create an account to join the conversation.
Time to create page: 0.166 seconds