![]() |
Re: Is it possible to have your own tabs
Addison,
Thank you for the base example. Could you please clarify for me? Quote:
I am trying to make a basic tab at the end of my current tabs. This is what is at the end of my current file. Code:
if ( Using your example, I end up with: Code:
if ( Does that look right? I have run cleanup.php, but the tab does not seem to show. My tab_videos.tpl is empty, but I was thinking that the tab should at least show. To test, I also used vote_reviews.tpl to at least populate the tab, but it did not seem to work either. Any guidance you could give would be greatly appreciated. Thanks! |
Re: Is it possible to have your own tabs
You have to insert that code before if (!empty($product_tabs)) statement. Because $product_tabs is passed already to the template and you come to add to this array a new value, this is not correct.
Make sure this template file exists customer/main/tab_videos.tpl and having some content (just for testing). |
Re: Is it possible to have your own tabs
Addison,
Thank you for the reply. Could you please clarify. Do I need a new Code:
if (!empty($product_tabs)) Code:
if ( Thanks! |
Re: Is it possible to have your own tabs
Just tested and it shows video tab
PHP Code:
http://i45.tinypic.com/dc68nn.png |
Re: Is it possible to have your own tabs
@Pyro - look how simple it is based on Toora Designs's example.
You can create as much tabs as you want using this code PHP Code:
You can re-arrange the tabs moving the code up and down with cut&paste. All tabs must be created before this code PHP Code:
Pyro, do it yourself to see how easy it is. For sure in 2 months you will come here with a brand new solution for creating and re-arranging tabs in admin (content, position), with enable/disable, of course new/remove tabs should use jQuery :) |
Re: Is it possible to have your own tabs
Addison and Toora,
Thank you both for your replies. If I could click "thank you" 1,000 times each I would do it! Unfortunately, it only allows me to do it once... so you will have to settle for that. :wink: As far as copy and pasting goes, I had no problem there. What I was really missing was the understanding of what that last piece of code did. I was under the impression that it was just the last tab - not that it was what "completed" the tabs so to speak. With that knowledge and Toora's complete example of a complete tab (the if portion is what I was really missing), I was able to successfully make my own tabs. Thank you both again! |
Re: Is it possible to have your own tabs
Toora or Addison,
Could you please clarify something? If I wanted a certain tab to only show on products from a certain category, would I create an if statement around the existing tab or would I modify the code of the existing tab? I have tried this, but it does not seem to work as expected. Quote:
Thank you! |
Re: Is it possible to have your own tabs
check if that variable is available in product page $product.categoryid with debugging console.
|
Re: Is it possible to have your own tabs
Quote:
Addison, Thank you for the reply. I have not used the debugging console before, but I will give it a try now. Prior, I was using print_r to find what is available, but I could not seem to make it work with the tabs. Do you happen to have any more specific pointers of where I am going wrong? (Possibly an example?) Thanks again. |
Re: Is it possible to have your own tabs
Once you find $product.categoryid see it what value has in debugging console. It could not be 1 as you made that if statement.
Hope to write soon a thread about using one of XCart functions named x_log_add. This is a fantastic feature to use it inside a php code and then see what is happening in a separate file. Same like a debugging tool. |
All times are GMT -8. The time now is 11:47 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.