X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   DIY Tabbed Content Menu for Product Page (https://forum.x-cart.com/showthread.php?t=11094)

longhorn180 04-13-2005 03:19 AM

Open up your product.tpl and look for this line:

Code:

{if $product.fulldescr ne ""}{$product.fulldescr}{else}{$product.descr}{/if}

Comment that out and that should do the trick.

jmell 04-13-2005 03:26 AM

Thanks that did it.
Works 4.0.12
Thanks All.
:P

shwekhaw 04-17-2005 06:21 PM

I like to use this tabbed menu mod. I like to know if there is anyway I can define tab title name for each product? Some products need unique tabs and I do not want such tabs to show up in other product pages.

Please let me know if this is possible to configure. I have not look at the code in detail yet.

PhilJ 04-18-2005 02:04 AM

shwekhaw, do something like

Code:

{if $product.productid == "100"}
Put alternative tab code here
{else}
Put usual tab code here
{/if}


shwekhaw 04-18-2005 06:26 PM

8) Not that simple for my site. I have about 50 - 100products that would need custom tab.
Thanks anyway.

darrylb1231 05-02-2005 04:32 PM

Thanks for the Mod.

I got it installed and wanted to add my product details in a tab. I can not figure out what .tpl hold the Product Detailed Description.

Does anyone know the file or have the code?

Thanks!
Darryl

dalmuti 05-09-2005 06:59 AM

I am using this mod and it works great....but as other have written about hiding tabs, etc when there is nothing to display. I've tried and tried using all the comments in the post and just cannot seem to get it right.

This is the exact code on my site. Related products is set as the default tab but for alot of the products I do not have any related products so all you see are tabs.

Can some assist me with this so that when there is no Related Products that the default tab is Send to Friend and the Related Products tab does not show up?

I appreciate any assistance as I've tried and cannot seem to get it to work.

Thanks,

Louise
Code:

<div align="center">
<a name="tabs"></a>
<ul id="tablist">[*]Related Products[*]Product Reviews[*]Send to a Friend[/list]<DIV id="tabcontentcontainer">
<div id="sc1" class="tabcontent">
{if $active_modules.Upselling_Products ne ""}
{include file="modules/Upselling_Products/related_products.tpl" }
{/if}
</div>
<div id="sc2" class="tabcontent">
{if $active_modules.Customer_Reviews ne ""}
{include file="modules/Customer_Reviews/vote_reviews.tpl" }
{/if}
</div>
<div id="sc3" class="tabcontent">
{include file="customer/main/send_to_friend.tpl" }
</div>
</DIV>
</div>


markwhoo 05-09-2005 03:17 PM

EXAMPLE:

Code:


<a name="tabs"></a>
<ul id="tablist"> [*]DETAILS [*]MORE INFO [*]SEND TO FRIEND [*]REVIEWS
{if $product_links ne ""} [*]RELATED PRODUCTS
{/if}[/list]
<DIV id="tabcontentcontainer">

<div id="sc1" class="tabcontent">
{include file="customer/main/details.tpl" }
</div>

<div id="sc2" class="tabcontent">
{include file="extrainfo.tpl" productid=$product.productid }
</div>

<div id="sc3" class="tabcontent">
{include file="customer/main/send_to_friend.tpl" }
</div>

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

<div id="sc5" class="tabcontent">
{if $active_modules.Upselling_Products ne ""}
{include file="modules/Upselling_Products/related_products.tpl" }
{/if}
</div>
</DIV>


taltos1 05-11-2005 09:40 AM

I just wanted to say thank you for this mod. I am working on my first X-Cart site and this is an awesome mod. THANKS!!!!

UPDATE: Got this working fine, but 1 question. I used CopperB code (from page 4 of this post) and I would like to remove the "Product Details" tab, as that is the same exact info that is in the upper portion of the product info. So then the "send to a friend" tab becomes the first tab. I played with the product.tpl file and was able to make the info under that tab go away, but not the tab itself.. any suggestions. Thanks a lot!

Thanks a lot.

markwhoo 05-11-2005 02:11 PM

Quote:

Originally Posted by taltos1
I just wanted to say thank you for this mod. I am working on my first X-Cart site and this is an awesome mod. THANKS!!!!

UPDATE: Got this working fine, but 1 question. I used CopperB code (from page 4 of this post) and I would like to remove the "Product Details" tab, as that is the same exact info that is in the upper portion of the product info. So then the "send to a friend" tab becomes the first tab. I played with the product.tpl file and was able to make the info under that tab go away, but not the tab itself.. any suggestions. Thanks a lot!

Thanks a lot.


Change the following layout for the tab appearance and names:

Code:

Code:

 
<a name="tabs"></a>
<ul id="tablist"> [*]DETAILS [*]MORE INFO [*]SEND TO FRIEND [*]REVIEWS
{if $product_links ne ""} [*]RELATED PRODUCTS
{/if} [/list]


taltos1 05-11-2005 05:52 PM

Do I put that code in home.tpl? And does that replace some of the code or just add to it?

Thanks again

markwhoo 05-11-2005 07:04 PM

This is the code that you placed in the product.tpl for the tabs to appear.

What I showed you is the art you need to adjust to make the tabs themselves appear. Simply modify the names for what you want and ensure you change the layout of the remaining tabs in the lower part of the code to match.

Also the tab nubering is critical. It must match as well.

snorocket 05-21-2005 04:56 PM

impressive mod
 
How do you get the tabs to look like x-onlines here:

http://www.directav.com.au/product.php?productid=301&cat=0&page=1

zardos 05-21-2005 06:18 PM

Hi snorocket

Tabbed Product Menu at:

www.cart-lab.com

snorocket 05-21-2005 11:38 PM

This Thread
 
Hi Zardos, the topic of this thread is about the Tabbed Product Menu and best of all its FREE. I would just like to have the tabs look like the ones posted in the link above, its just a matter of formatting but can't get it to look quite the same, oh well, how it is works great as is, Thanks guys

Maree 05-31-2005 04:50 AM

My Hair is falling out
 
I'm very tired.

I am running 4.0.13 and have modified tpls as per CopperB's instructions on p4 of this thread.

The following error message appears indicating problems in product.tpl.

I have been over the steps several times. Finally restored the original product.tpl and modified it following those steps again.


Fatal error: Smarty error: [in customer/main/product.tpl line 209]: syntax error: unclosed tag {else} (opened line 11). (Smarty_Compiler.class.php, line 308) in /www/clientweb/au/o/ozquilts.com.au/xcart/Smarty-2.6.3/Smarty.class.php on line 1082


Can someone please point me to a solution? I plan to learn Smarty php but am flat out like a lizard drinking getting the damn site to a point where it can go live as well as running the normal business (I'm having my own little pity party here.....will this website ever be live).

Maree

4.0.13
AOM, Fancy Cats, Easy Checkout, Easy Upsell
Neon Lights template

longhorn180 05-31-2005 05:23 AM

I believe this means that you're likely missing an {/if} tag somewhere, but without seeing the code I can't tell you for sure.

Maree 06-01-2005 04:26 AM

Thanks Longhorn
 
Thanks Longhorn
Yes you were right :). I found the missing endif.

Now the appearance of my product.tpl page is thown out - I suspect it may be because I have the Neon Lights addon but I am not sure. Rather than back out of the modification I want to work this out because I would much prefer the compact layout of the tabbed menu than scrolling down a long page.

I appreciate the time you took to respond to my post - It was one of those X moments (rolleyes).

Ok..back to checking my code

Maree 06-01-2005 05:36 AM

I need some help please.

My website is http://www.ozquilts.com.au/xcart/home.php

I'm hoping to go live soon and still working on gifs in Photoshop.

I cannot get this mod working. My product.tpl looks like this -(EEEK!)
http://www.ozquilts.com.au/xcart/product.php?productid=16855&cat=0&page=1

The only difference I noted in this mod was in step 4 -
My customer.home.tpl has thin line

<LINK rel="stylesheet" href="{$SkinDir}/{#CSSFile_c#}">
<LINK rel="stylesheet" href="{$SkinDir}/tabs.css">

CssFile_c refers to my custom neon lights skin.


The code is not pulling up my skin for the product page though and I cannot see why not. I have the Smarty php manual and am goin thru that and have stepped thru the file pointers but am getting nowhere.

Can anyone give me some idea of the problem?
Thanks

Maree
4.0.13, Eazy Upsell, Easy Checkout, AOM, Fancy Cats, Neon Lights

TelaFirma 06-01-2005 06:59 AM

You have a serious problem with your /customer/home.tpl file.

As best that I can tell you are calling the /customer/main/product.tpl file at the very begining of it. This causes all that extra code before you ever get to the <HEAD> tag....

Maree 06-02-2005 03:55 PM

Thank you Telafirma for your reply -

Ryano 06-03-2005 04:54 PM

Hi everyone, I got this mod working great on my site now. Thanks to everyone that helped make it possible. :) One thing I noticed is that when you click on a tab for a certain product, and then go to another product, the first tab to show up is the one that was last clicked on the previous product. Instead I would like for Product Details, which is my first tab, to always pop up first each time a product is clicked. Does anyone have a fix for this? Thanks!!!!!

IndieDepot 06-03-2005 11:22 PM

Quote:

Originally Posted by Ryano
Hi everyone, I got this mod working great on my site now. Thanks to everyone that helped make it possible. :) One thing I noticed is that when you click on a tab for a certain product, and then go to another product, the first tab to show up is the one that was last clicked on the previous product. Instead I would like for Product Details, which is my first tab, to always pop up first each time a product is clicked. Does anyone have a fix for this? Thanks!!!!!


Yea, that's easy. Just adjust the settings in the "tab.js" file at the top. it asks you what tab you want to show first. Just set it to the number. Also there's another setting at the bottom of the tab.js file that does something as well.

- Shannon

Ryano 06-04-2005 08:38 PM

Got it to work...Thanks again Shannon! :D

Ryano 06-11-2005 08:33 PM

Hi gang,
Me again, lol. I was trying to use this mod along with the following mod:

http://forum.x-cart.com/viewtopic.php?t=13226&highlight=

The other mod allows you to put the detailed image in place of the thumbnail. The probably that I am now running into is that if I don't have a second detailed image, then the tab "Detailed Images" remains there without an actual image in its box. Has anyone else integrated these two mods together or does anyone know how I can only have the Detailed Image tab show only when there is an actual 2nd detailed image to show? Thank you! :D :D

taltos1 06-15-2005 11:11 AM

Quote:

Originally Posted by markwhoo
Quote:

Originally Posted by taltos1
I just wanted to say thank you for this mod. I am working on my first X-Cart site and this is an awesome mod. THANKS!!!!

UPDATE: Got this working fine, but 1 question. I used CopperB code (from page 4 of this post) and I would like to remove the "Product Details" tab, as that is the same exact info that is in the upper portion of the product info. So then the "send to a friend" tab becomes the first tab. I played with the product.tpl file and was able to make the info under that tab go away, but not the tab itself.. any suggestions. Thanks a lot!

Thanks a lot.


Change the following layout for the tab appearance and names:

Code:

Code:

 
<a name="tabs"></a>
<ul id="tablist"> [*]DETAILS [*]MORE INFO [*]SEND TO FRIEND [*]REVIEWS
{if $product_links ne ""} [*]RELATED PRODUCTS
{/if} [/list]


Hello,
I edited that area and got rid of the "Product Details" tab, the problem now though, is that even though the tab is gone, and "More Info" is the first tab, under that is the text for product details anway?

taltos1 06-18-2005 06:00 AM

Anyone...this is eluding me? Thanks

markwhoo 06-18-2005 12:50 PM

Taltos1,

Now you must also go the the content part of the script and adjust to what you modified the tabs to. look at the div tags, these are numbered sc1 sc2 etc.

now you must align this part of the sript to the tabs as they appear.

Code:


 <a name="tabs"></a> <ul id="tablist">[*]Send to Friend[*]Detailed Images[*]Related Products[*]Recommended Products[*]Customer Reviews[/list]
<DIV id="tabcontentcontainer">
<div id="sc1" class="tabcontent"> {include file="customer/main/send_to_friend.tpl" } </div> <div id="sc2" class="tabcontent"> {if $active_modules.Detailed_Product_Images ne ""} {include file="modules/Detailed_Product_Images/product_images.tpl" } {/if} </div>

<div id="sc3" class="tabcontent"> {if $active_modules.Upselling_Products ne ""} {include file="modules/Upselling_Products/related_products.tpl" } {/if} </div>

<div id="sc4" class="tabcontent"> {if $active_modules.Recommended_Products ne ""} {include file="modules/Recommended_Products/recommends.tpl" } {/if}

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


thepbstore 06-21-2005 01:31 AM

Problems
 
Ok I am having major issues, I am using xcart 3/14 .. here is the example for the site

http://www.thepbstore.com/cart/product.php?productid=16272&cat=0&page=1


I get it installed, the links make others disapear, HOW EVER, how do you get it to be tabbed horizonally? and how do you clean it up so the rest vanish? I am not getting it ..

What it looks like inside the Product.tpl
Code:

<a name="tabs"><ul id="tablist">
{if $product_links ne ""} [*]Related
{/if}
{if $images ne ""} [*]Detailed Images
{/if} [*]Send to Friend
{if $active_modules.Customer_Reviews ne ""}
  {if $config.Modules.customer_voting eq "Y" or $config.Modules.customer_reviews eq "Y"} [*]Reviews
  {/if}
{/if}
{if $recommends} [*]Recommended
{/if} [/list]<DIV id="tabcontentcontainer">
<div id="sc1" class="tabcontent"> {include file="customer/main/send_to_friend.tpl" } </div> <div id="sc2" class="tabcontent"> {if $active_modules.Detailed_Product_Images ne ""} {include file="modules/Detailed_Product_Images/product_images.tpl" } {/if} </div>

<div id="sc3" class="tabcontent" hidden=true> {if $active_modules.Upselling_Products ne ""} {include file="modules/Upselling_Products/related_products.tpl" } {/if} </div>

<div id="sc4" class="tabcontent"> {if $active_modules.Recommended_Products ne ""} {include file="modules/Recommended_Products/recommends.tpl" } {/if}

</div> <div id="sc5" class="tabcontent"> {if $active_modules.Customer_Reviews ne ""} {include file="modules/Customer_Reviews/vote_reviews.tpl" } {/if} </div> </DIV>
{/capture}
{include file="dialog.tpl" title=$product.product content=$smarty.capture.dialog extra="width=100%"}

{/if}


I have all my other things completed like it says. Curious what the hell am I doing wrong? just being an idiot? is the skin1.css taking over and changing the format? thanks for everything in advanced, and such

markdstephens 07-09-2005 10:39 AM

Great mod thanks to all.

Have added checks to see if product is part of a specific category by examining the SKU code. We use category prefixes to easily identify a product.

Eg: If SKU begins with a SC eg: SC045, SC183 etc. then we know it is shoes and hence display the tab for the recent press.

Code:

{if substr($product.productcode, 0, 2) == "SC"}[*]Recent Press
{/if}


We have default tab set to 1 in tabs.js

Code:

var initialtab=[1, "sc1"]

which autmatically opens the Detail Images tab if detailed images exist.

Question is I want to be able to set the default tab to say sc6-recent press and have it open automatically if there are no detailed images.

Basically do some sort of logic test in tabs.js. Anyone any ideas :idea:

Cheers

4.0.13

snorocket 07-09-2005 01:19 PM

just buy BOOMERS
 
I recommend highly not wasting your time and buying BOOMER's Tabbed Menu even though its based on a free script BOOMER has taken the time to make it integrated and cleaned it up to make it look professional which is what your paying for ;)

markwhoo 07-11-2005 05:42 PM

Phil,

Not sure if you are watching this thread any longer, but thought I would throw this question out to see if I can get a possible answer.

I have implemented this tabbed menu on several sites now and it is great. I love it.

I was asked to add it to an older store (3.4) branch and I did. After I did and was testing, I found the addition of the tabbed menu caused the voting, reviews, add to cart button, add to wsh list buttone etc. to not work.

Is there a reason you may know of that may cause this?

I have temporarily reverted the cart back to original set up until I may find an answer to this unsuaual twist.

Another thought here was to add literal tags to this to make it work properly and when these tags were added, the tab script would not work.

bluecat 07-12-2005 09:30 PM

Great mod, thank you.

Is it possible to NOT let the detailed image load (to save on bandwidth and speed up load time), UNLESS they specifically click on the detailed images tab?

Thank you

Tristan 07-28-2005 11:41 AM

Thank you very much PhilJ and everyone who added tweaks along the way. It has helped me alot. :)

taltos1 10-24-2005 10:10 AM

Thanks all again for this. I am having a small problem with this mod in IE though. In the product details area. The bottom line of the all the boxes are gone, or getting cut off? any ideas how to fix that, in firefox there is no problem.

THanks

ricky 12-01-2005 09:36 AM

Nice hack and I hope you can help with the install on my site. I've ran into a couple problems with trying to install. I've installed everything as instructed but I'm getting this on my site: http://www.muscle-mustangs.com/shop/product.php?productid=16199&cat=285&page=1#tabs


It deleated the entire product description and when the tabs are clicked, they don't bring up the desitred function.

Anythoughts to what I have done wrong? :)

ricky 12-01-2005 11:03 AM

Got it to work everyone ;)

just_me 12-08-2005 03:09 AM

Tabbed content menu for product page with dynamic labels
 
We have implemented this DIY mod and are absolutely enthusiastic about it. Thanks. :lol:
We have changed the way the tabs text is shown in order to accommodate our trilingual webstore. The original text, for example "Recommended Products", has been replaced by it's equivalent label, in this case, {$lng.lbl_recommends}.

The other labels are:
{$lng.lbl_send_to_friend}

{$lng.lbl_detailed_images}

{$lng.lbl_customer_reviews}

{$lng.lbl_related_products}

Here is the revised code:



<a name="tabs"></a>
<ul id="tablist">[*]{$lng.lbl_detailed_images} [*]{$lng.lbl_send_to_friend}[*]{$lng.lbl_related_products}[*]{$lng.lbl_recommends}[*]{$lng.lbl_customer_reviews} [/list]
<DIV id="tabcontentcontainer">

<div id="sc1" class="tabcontent">
{include file="modules/Detailed_Product_Images/product_images.tpl" }
</div>

<div id="sc2" class="tabcontent">
{include file="customer/main/send_to_friend.tpl" }
</div>

<div id="sc3" class="tabcontent">
{if $active_modules.Upselling_Products ne ""}
{include file="modules/Upselling_Products/related_products.tpl" }
{/if}
</div>

<div id="sc4" class="tabcontent">
{include file="modules/Recommended_Products/recommends.tpl" }
</div>

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

</DIV>

{if $active_modules.Product_Options ne '' && $product_options ne ''}
<SCRIPT type="text/javascript" language="JavaScript 1.2">
check_options();
</SCRIPT>
{/if}


We also changed the order so that sc1, the default tab shown, is the detailed image instead of send to a friend. Because all our products have detailed images and because of the nature of the product we sell, that is what the customer wants to see first.

You can see it at work here:
http://www.mercalydia.com/tienda/catalog/english/index.html

Again, thanks for sharing this mod. I just wanted to share my little bit here.

Lucent88 01-13-2006 03:37 PM

I tried this mod, it is a great mod. My only concern is while all other contents on the page already loaded, the contents within the tab menu still takes another 7-8 sec. to load. Even just for the product detail tab (which contents mostly text or only text).

Does anyone else have the same problem? I need some feedback.

taltos1 02-11-2006 10:44 AM

I am trying to get this to work on V 4.1_RC? Anyone had any luck?

Thank you.


All times are GMT -8. The time now is 01:17 AM.

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