- Posts: 22
- Thank you received: 1
Moving downloads to a tab
7 years 6 months ago - 7 years 6 months ago #306075
by DavidVogt
Moving downloads to a tab was created by DavidVogt
-- HikaShop version -- : 4.0.3
-- Joomla version -- : 3.9.5
-- PHP version -- : 7.0
Hi friends,
I'm trying to do something that I thought would be simple, but I must have gone wrong somewhere. What I want is to MOVE the "Downloads" section of the product page into a tab. I've modified the show_tabular view and added the code from the downloads section. It's working initially, but when clicking on another tab the downloads section doesn't go away. I've attached my view file and hope you can point me in the right direction -- my code starts at line 231. I know this isn't something you normally do but I'm hoping it's a simple fix.
Thank you very much!
-- Joomla version -- : 3.9.5
-- PHP version -- : 7.0
Hi friends,
I'm trying to do something that I thought would be simple, but I must have gone wrong somewhere. What I want is to MOVE the "Downloads" section of the product page into a tab. I've modified the show_tabular view and added the code from the downloads section. It's working initially, but when clicking on another tab the downloads section doesn't go away. I've attached my view file and hope you can point me in the right direction -- my code starts at line 231. I know this isn't something you normally do but I'm hoping it's a simple fix.
Thank you very much!
Last edit: 7 years 6 months ago by DavidVogt.
Please Log in or Create an account to join the conversation.
7 years 6 months ago #306087
by nicolas
Replied by nicolas on topic Moving downloads to a tab
Hi,
You need to separate your code.
The tabs system is comprised of two pieces:
- the ul/li list of the titles for each tab
- the divs with the content of each tab
I can see that you put the div with the content of your new tab right after the title of your new tab inside the ul/li list of the titles.
You should move the div with the content of your new tab after/before another tab's content div. For example, just before the line:
which is the beginning of the content div for the vote/comment tab.
You need to separate your code.
The tabs system is comprised of two pieces:
- the ul/li list of the titles for each tab
- the divs with the content of each tab
I can see that you put the div with the content of your new tab right after the title of your new tab inside the ul/li list of the titles.
You should move the div with the content of your new tab after/before another tab's content div. For example, just before the line:
Code:
if($status_vote == "comment" || $status_vote == "two" || $status_vote == "both" ) { ?>
Please Log in or Create an account to join the conversation.
7 years 6 months ago #306117
by DavidVogt
Replied by DavidVogt on topic Moving downloads to a tab
THANK YOU! That was super helpful, Nicolas. The tabs now seem to be working properly with the downloads showing. One final problem: In some products, the tab is showing, but the files are not there.
It works here:
fisher.sptlt.com/products/gold-treasure/...r-f11-metal-detector
It doesn't work here:
fisher.sptlt.com/products/security/evide...urity-metal-detector
Any insight would be greatly appreciated!
It works here:
fisher.sptlt.com/products/gold-treasure/...r-f11-metal-detector
It doesn't work here:
fisher.sptlt.com/products/security/evide...urity-metal-detector
Any insight would be greatly appreciated!
Please Log in or Create an account to join the conversation.
7 years 6 months ago - 7 years 6 months ago #306123
by Philip
Replied by Philip on topic Moving downloads to a tab
Hello,
I don't see any important issue with your code, why don't you make a var_dump on your "$this->element->files" in order to see if there is something different, or maybe you have a check that don't match a specific case ?...
Maybe for a reason or another "$this->element->files" is empty, and so you don't enter in your "if($freeDownload)" check ?...
So far and whithout debug hard to say more.
Hope this will help you.
Regards
I don't see any important issue with your code, why don't you make a var_dump on your "$this->element->files" in order to see if there is something different, or maybe you have a check that don't match a specific case ?...
Maybe for a reason or another "$this->element->files" is empty, and so you don't enter in your "if($freeDownload)" check ?...
So far and whithout debug hard to say more.
Hope this will help you.
Regards
Last edit: 7 years 6 months ago by Philip.
Please Log in or Create an account to join the conversation.
Time to create page: 0.053 seconds