| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Is it possible to have your own tabs | ||||
|
|
Thread Tools | Search this Thread |
#11
|
|||||||
|
|||||||
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:
Using your example, I end up with: Code:
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!
__________________
Best Wishes, James 4.5.2 Gold (work in progress) |
|||||||
#12
|
|||||||||
|
|||||||||
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).
__________________
X-Cart Next: Business 5.2 (learning and testing) X-Cart Classic: Gold and Gold Plus 4.7 Lots of Modules and Customizations OS in use: Red Hat Enterprise, Fedora, CentOS, Debian, Ubuntu, Linux Mint, Kali Linux Ideas for Server configuration (basicaly): Nginx/Pound (reverse proxy), Apache/Nginx (webserver), Squid/Varnish (cache server), HHVM or (PHP-FPM + PHP 5.6 + opcache), MariaDB/Percona MySQL Server, Redis (storing sessions) You can catch my ideas here: http://ideas.x-cart.com |
|||||||||
|
#13
|
|||||||
|
|||||||
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:
Code:
Thanks!
__________________
Best Wishes, James 4.5.2 Gold (work in progress) |
|||||||
#14
|
|||||||||
|
|||||||||
Re: Is it possible to have your own tabs
Just tested and it shows video tab
PHP Code:
http://i45.tinypic.com/dc68nn.png
__________________
If you need professional help on your x-cart site or any website. Feel free to PM me or Skype me to discuss your project. |
|||||||||
|
#15
|
|||||||||
|
|||||||||
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
__________________
X-Cart Next: Business 5.2 (learning and testing) X-Cart Classic: Gold and Gold Plus 4.7 Lots of Modules and Customizations OS in use: Red Hat Enterprise, Fedora, CentOS, Debian, Ubuntu, Linux Mint, Kali Linux Ideas for Server configuration (basicaly): Nginx/Pound (reverse proxy), Apache/Nginx (webserver), Squid/Varnish (cache server), HHVM or (PHP-FPM + PHP 5.6 + opcache), MariaDB/Percona MySQL Server, Redis (storing sessions) You can catch my ideas here: http://ideas.x-cart.com |
|||||||||
|
#16
|
|||||||
|
|||||||
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. 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!
__________________
Best Wishes, James 4.5.2 Gold (work in progress) |
|||||||
#17
|
|||||||
|
|||||||
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!
__________________
Best Wishes, James 4.5.2 Gold (work in progress) |
|||||||
#18
|
|||||||||
|
|||||||||
Re: Is it possible to have your own tabs
check if that variable is available in product page $product.categoryid with debugging console.
__________________
X-Cart Next: Business 5.2 (learning and testing) X-Cart Classic: Gold and Gold Plus 4.7 Lots of Modules and Customizations OS in use: Red Hat Enterprise, Fedora, CentOS, Debian, Ubuntu, Linux Mint, Kali Linux Ideas for Server configuration (basicaly): Nginx/Pound (reverse proxy), Apache/Nginx (webserver), Squid/Varnish (cache server), HHVM or (PHP-FPM + PHP 5.6 + opcache), MariaDB/Percona MySQL Server, Redis (storing sessions) You can catch my ideas here: http://ideas.x-cart.com |
|||||||||
|
#19
|
|||||||
|
|||||||
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.
__________________
Best Wishes, James 4.5.2 Gold (work in progress) |
|||||||
#20
|
|||||||||
|
|||||||||
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.
__________________
X-Cart Next: Business 5.2 (learning and testing) X-Cart Classic: Gold and Gold Plus 4.7 Lots of Modules and Customizations OS in use: Red Hat Enterprise, Fedora, CentOS, Debian, Ubuntu, Linux Mint, Kali Linux Ideas for Server configuration (basicaly): Nginx/Pound (reverse proxy), Apache/Nginx (webserver), Squid/Varnish (cache server), HHVM or (PHP-FPM + PHP 5.6 + opcache), MariaDB/Percona MySQL Server, Redis (storing sessions) You can catch my ideas here: http://ideas.x-cart.com |
|||||||||
|
|
|||
X-Cart forums © 2001-2020
|