X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Third Party Add-Ons for X-Cart 4 (https://forum.x-cart.com/forumdisplay.php?f=45)
-   -   Tabbed Product Menu (https://forum.x-cart.com/showthread.php?t=37914)

lizlee00 02-27-2008 03:24 PM

Tabbed Product Menu
 
Hello,
I'm using the Ultimate Tabbed Product Menu from Xcartmods.co.uk (http://www.xcartmods.co.uk/x-cart-ultimate-tabbed-product-menu/). It is working great. But I would like to add some logic to how the tabs are displayed. If a tab does not contain any data I would like it to not show up. I have an order of how I'd like my tabs to show: Product Specs (an Extra Field), Related Products, Reccomended Products, Reviews, Send to Friend, and Request Info. Product Specs, Related Products, and Reccomended products have the potential of being empy. If there is no data in Product Specs, I'd like that tab not to show, and the Related Products tab to show up instead, and so on. I have attempted this with some if statements but it doesn't seem to be working for me. (here is an example of how it is currently showing up: http://development.partssystems.com/truck-parts/nylon-corrugated-tubingsplit-loom.html) If anyone can give me some tips on the code I'd be most appreciative.

Code:


{* --------------------------------------- *}
{* Use rounded corners on tab content? y/n *}
{assign var='rounded' value='n'}
{* Show product description? y/n *}
{assign var='descr' value='n'}
{assign var='specs' value='n'}
{assign var='related' value='n'}
{assign var='recommends' value='n'}
{* --------------------------------------- *}
<br />
<div class="tabscontainer">
<a name="tabs" id="tabs"></a>
<div id="tabsmenu">
 <ul id="maintab">
 
{if $active_modules.Extra_Fields ne ""}
{if $extra_fields[0].field_value ne " "}
{assign var='specs' value='y'}
<li class="selected"><a href="#tabs" rel="tcontent9" title="Product Specifications"><span>Product Specs</span></a></li>
{/if}{/if}
 
{if $active_modules.Upselling_Products ne ""}
{if $product_links}{assign var'related' value='y'}
{if $specs eq 'y'}
<li><a href="#tabs" rel="tcontent5" title="{$lng.lbl_upselling_links}"><span>{$lng.lbl_upselling_links}</span></a></li>
{else}
<li class="selected"><a href="#tabs" rel="tcontent5" title="{$lng.lbl_upselling_links}"><span>{$lng.lbl_upselling_links}</span></a></li>
{/if}
  {/if}
  {/if}

{if $recommends}{assignvar'recommends' value='y'}
{if $specs eq 'y' or $related eq 'y'}
<li><a href="#tabs" rel="tcontent6" title="{$lng.lbl_recommends}"><span>Customers also Liked</span></a></li>
{else}
<li class="selected"><a href="#tabs" rel="tcontent6" title="{$lng.lbl_recommends}"><span>{$lng.lbl_recommends}</span></a></li>
{/if}
{/if}
 
{if $active_modules.Customer_Reviews ne ""}
{if $specs eq 'y' or $related eq 'y' or $recommends eq 'y'}
<li><a href="#tabs" rel="tcontent7" title="{$lng.lbl_customer_reviews}"><span>Reviews</span></a></li>
{else}
<li class="selected"><a href="#tabs" rel="tcontent7" title="{$lng.lbl_customer_reviews}"><span>{$lng.lbl_customer_reviews}</span></a></li>
{/if}
{/if}
                                {if $config.Appearance.send_to_friend_enabled eq 'Y'}
  <li><a href="#tabs" rel="tcontent3" title="{$lng.lbl_send_to_friend}"><span>{$lng.lbl_send_to_friend}</span></a></li>
  {/if}
<li><a href="#tabs" rel="tcontent8" title="{$lng.lbl_enquire}"><span>Request Info</span></a></li>

 </ul>



PhilJ 02-27-2008 04:48 PM

Re: Tabbed Product Menu
 
Your dev site isn't showing up for me, drop me a line and I'll try and help.

carpeperdiem 02-27-2008 07:46 PM

Re: Tabbed Product Menu
 
Maybe this will help you... note the div id="tcontent1", tcontent2, etc...

Quote:

<div class="tabboxcontent">

<div class="tabscontentcontainer">

<div id="tcontent1" class="tabcontent">
{if $active_modules.Customer_Reviews ne ""}
{include file="modules/Customer_Reviews/vote_reviews.tpl" }
{/if}
</div>

{if $config.Appearance.send_to_friend_enabled eq 'Y'}
<div id="tcontent2" class="tabcontent">
{include file="customer/main/send_to_friend.tpl" }
</div>
{/if}

{if $cat eq "7" or $cat eq "8" or $cat eq "9" }
{elseif $active_modules.Extra_Fields ne ""}
<div id="tcontent3" class="tabcontent">
{include file="modules/Extra_Fields/product.tpl"}
</div>
{/if}


</div>

</div>

designtheweb 02-29-2008 06:47 PM

Re: Tabbed Product Menu
 
I have created extra tabs and need to know specifically how to display an extra field in each tab, not all the extra fields at once.

Any help greatly appreciated.

lizlee00 03-01-2008 08:33 AM

Re: Tabbed Product Menu
 
So far I have gotten a great response from xcartmodscouk. I display an extra field in one of my tabs. The extra fields are numbered, so you need to call out the correct one. To add my specifications extra field I used this: {$extra_fields[0].field_value}. Hope that helps.

designtheweb 03-01-2008 03:41 PM

Re: Tabbed Product Menu
 
Thanks Liz, you are my new best friend :-)

To clarify for others the following goes in the second half of the tabs.tpl file:

Please note that your first extra field would have [0] in it, here [2] is my third extra field.

<div id="tcontent12" class="tabcontent">
{$extra_fields[2].field_value}
</div>

Easy when you know how but frustrating when you don't.

derby 08-15-2008 12:57 PM

Re: Tabbed Product Menu
 
I'm trying to just get the Tabbed Product Menu installed correctly but my attempts have not been successful. Could someone assist me with the installation of the menu? Much obliged.

ReadytoCover 08-17-2008 08:31 PM

Re: Tabbed Product Menu
 
I'm also using Phils Product Tabbed Menu (Great Mod!) and I was wondering if it is possible to place the Product Short Desc, Options, and Add to Cart button in a tab and have the tabs sit nice next to the item picture.

Anyone know if this can be done, here is a picture to try and clarify more:

http://www.readytocover.com/tabbed.jpg


All times are GMT -8. The time now is 12:54 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.