![]() |
Hide related products tpl when there are none
Is there anybody who knows what code to use to hide/not display the related products tpl when there are no related products?
|
Re: Hide related products tpl when there are none
Have you tried:
{if $product_links eq ""} |
Re: Hide related products tpl when there are none
Problem is how to implement this, the code in product.tpl says:
Code:
{if $active_modules.Upselling_Products ne ""} Not quite sure how to put the {if $product_links eq ""} in it. Maybe something like: --- {if $active_modules.Upselling_Products ne "" && $product_links eq ""} <p /> {include file="modules/Upselling_Products/related_products.tpl" } {/if} --- But that doesn't work ... |
Re: Hide related products tpl when there are none
Use:
PHP Code:
|
Re: Hide related products tpl when there are none
Just like that! I thought you had become an expert in all this by now!?!?!?
|
Re: Hide related products tpl when there are none
Quote:
:) Sorry, I'm an X-Adept now ... lost the eXpert ... :D But I had an eXpert vision, the code that Eugene posted is what I mentioned before, but it doesn't work somehow :( |
Re: Hide related products tpl when there are none
Quote:
The code is different: Quote:
|
Re: Hide related products tpl when there are none
Thanks Eugene,
I did use your code but it doesn't work ... tried templates cleanup as well, no good I'm afraid. |
Re: Hide related products tpl when there are none
Quote:
I've checked the default X-Cart templates. X-Cart doesn't show 'Related products' section if you don't specify any upselling product. Do you have a custom skin? |
Re: Hide related products tpl when there are none
Yes, I have a one of the X-Cart skin templates installed (Fashion Mosaic).
|
Re: Hide related products tpl when there are none
Quote:
Please PM me the URL of your product page that has 'Related products' section and doesn't have the upselling products. |
Re: Hide related products tpl when there are none
Please check your PM
|
Re: Hide related products tpl when there are none
Did you get my PM Eugene?
|
Re: Hide related products tpl when there are none
Did you ever get an answer for hiding related products when there are none with your custom mod?
Christine Quote:
|
Re: Hide related products tpl when there are none
Quote:
No. Could you please re-post it? |
Re: Hide related products tpl when there are none
Oops, I've send the PM around the end of january 2008 ... I'm kind of lost with what this thread was all about and if it has been solved more than one year later :roll:
|
Re: Hide related products tpl when there are none
Not sure what custom mod you have that Ene asked you about in a previous post. My custom mod is the "DIY Tabbed Content Menu for Product Page". The following post references the code I used to show the tab when there is content for related products: http://forum.x-cart.com/showthread.php?t=11094&page=19
Code: {if $product_links eq ""} {else} {if $active_modules.Upselling_Products ne ""} <li><a href="#tabs" rel="tcontent4">Related Items</a></li> {/if}{/if} Hope this will give you something to work with to remedy your problem. Christine Quote:
|
Re: Hide related products tpl when there are none
Thanks, seeing the code made me remember; unfortunately I didn't find a remedy and finally I dropped the tabbed display with the site it was meant for, sorry 'bout that :(
|
All times are GMT -8. The time now is 10:30 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.