Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Short and Detailed description

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 12-17-2008, 06:12 AM
 
ChristineP ChristineP is offline
 

eXpert
  
Join Date: Jul 2008
Posts: 310
 

Default Short and Detailed description

I've added a lot of information in our shopping cart and now I've added tabs for the products. Though I've found where X-Cart calls out the description as {$product.fulldescr} but I need to distinguish between the short and detailed descriptions. Having information in both the short and detailed description with {$product.fulldescr} only shows the detailed description in my tab. If I have a product that has only the short description, then X-Cart displays that information with the {$product.fulldescr}. I'd like the short description to be my "features" and the detailed description to be my "specifications". Can someone tell me what each tpl calls out for short description and seperately for detailed description?
__________________
______________
version 4.1.9 Gold
Reply With Quote
  #2  
Old 12-17-2008, 06:53 AM
  Vetrivel's Avatar 
Vetrivel Vetrivel is offline
 

eXpert
  
Join Date: Apr 2008
Posts: 398
 

Default Re: Short and Detailed description

Hi,
In skin1/customer/main/product.tpl
->you can find this line
{if $product.fulldescr ne ""}{$product.fulldescr}{else}{$product.descr}{ /if}
so,
to get full description->$product.fulldescr
to get short description->$product.descr

I think this will help you.

Quote:
Originally Posted by ChristineP
I've added a lot of information in our shopping cart and now I've added tabs for the products. Though I've found where X-Cart calls out the description as {$product.fulldescr} but I need to distinguish between the short and detailed descriptions. Having information in both the short and detailed description with {$product.fulldescr} only shows the detailed description in my tab. If I have a product that has only the short description, then X-Cart displays that information with the {$product.fulldescr}. I'd like the short description to be my "features" and the detailed description to be my "specifications". Can someone tell me what each tpl calls out for short description and seperately for detailed description?
Reply With Quote

The following user thanks Vetrivel for this useful post:
BBM_ (04-07-2011)
  #3  
Old 12-17-2008, 12:10 PM
 
ChristineP ChristineP is offline
 

eXpert
  
Join Date: Jul 2008
Posts: 310
 

Default Re: Short and Detailed description

Awesome! Thank you Vetrivel. I got the tabs working. There is a problem though, when I added text to my detailed description in my product, another tab appeared with the text that I added within my product detailed description. Any thoughts as to why or how I can fix this?

Quote:
Originally Posted by Vetrivel
Hi,
In skin1/customer/main/product.tpl
->you can find this line
{if $product.fulldescr ne ""}{$product.fulldescr}{else}{$product.descr}{ /if}
so,
to get full description->$product.fulldescr
to get short description->$product.descr

I think this will help you.
__________________
______________
version 4.1.9 Gold
Reply With Quote
  #4  
Old 12-17-2008, 07:12 PM
  Vetrivel's Avatar 
Vetrivel Vetrivel is offline
 

eXpert
  
Join Date: Apr 2008
Posts: 398
 

Default Re: Short and Detailed description

Double check whether you provide the same detailed description for both the tabs.
Quote:
Originally Posted by ChristineP
Awesome! Thank you Vetrivel. I got the tabs working. There is a problem though, when I added text to my detailed description in my product, another tab appeared with the text that I added within my product detailed description. Any thoughts as to why or how I can fix this?
Reply With Quote
  #5  
Old 12-18-2008, 05:57 AM
 
ChristineP ChristineP is offline
 

eXpert
  
Join Date: Jul 2008
Posts: 310
 

Default Re: Short and Detailed description

Hi Vetrivel,

I double checked my code, but nothing is obvious to me. Other than in the Tabs area (code posted below), what should I look for in product.tpl that would resolve this? ...see attached image


{* TABS MENU START (v4.1.x) *}

<a name="tabs" id="tabs"></a>

<ul id="maintab" class="shadetabs">

<li class="selected"><a href="#tabs" rel="tcontent1">Features</a></li>

{if $product.fulldescr ne ""}{$product.fulldescr}
<li><a href="#tabs" rel="tcontent2">Specifications</a></li>
{/if}


{if $active_modules.Detailed_Product_Images ne "" && ($config.Detailed_Product_Images.det_image_popup ne 'Y' || $js_enabled ne 'Y')}
{if $images ne ""}
<li><a href="#tabs" rel="tcontent3">Dimensions</a></li>
{/if}{/if}

{if $active_modules.Upselling_Products ne ""}
<li><a href="#tabs" rel="tcontent4">Related Items</a></li>
{/if}

</ul>

<div class="tabcontentstyle">

<div id="tcontent1" class="tabcontent">
{if $product.descr ne ""}{$product.descr}{ /if}
</div>

<div id="tcontent2" class="tabcontent">
{if $product.fulldescr ne ""}{$product.fulldescr}{/if}
</div>


{if $active_modules.Detailed_Product_Images ne "" && ($config.Detailed_Product_Images.det_image_popup ne 'Y' || $js_enabled ne 'Y')}
<div id="tcontent3" class="tabcontent">
{include file="modules/Detailed_Product_Images/product_images.tpl" }
</div>
{/if}

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

</div>

<script type="text/javascript">
//Start Tab Content script for UL with id="maintab" Separate multiple ids each with a comma.
initializetabcontent("maintab")
</script>

{* TABS MENU END *}



Quote:
Originally Posted by Vetrivel
Double check whether you provide the same detailed description for both the tabs.
Attached Thumbnails
Click image for larger version

Name:	Tabs.jpg
Views:	134
Size:	32.8 KB
ID:	1285  
__________________
______________
version 4.1.9 Gold
Reply With Quote
  #6  
Old 12-18-2008, 06:38 AM
  Vetrivel's Avatar 
Vetrivel Vetrivel is offline
 

eXpert
  
Join Date: Apr 2008
Posts: 398
 

Default Re: Short and Detailed description

If i am right .Your question is Why you get the TAB called test ?
then this is my answer
Remove the content marked in red.

Check it and tell me.

<li class="selected"><a href="#tabs" rel="tcontent1">Features</a></li>

{if $product.fulldescr ne ""}{$product.fulldescr}
<li><a href="#tabs" rel="tcontent2">Specifications</a></li>
{/if}

Quote:
Originally Posted by ChristineP
Hi Vetrivel,

I double checked my code, but nothing is obvious to me. Other than in the Tabs area (code posted below), what should I look for in product.tpl that would resolve this? ...see attached image


{* TABS MENU START (v4.1.x) *}

<a name="tabs" id="tabs"></a>

<ul id="maintab" class="shadetabs">

<li class="selected"><a href="#tabs" rel="tcontent1">Features</a></li>

{if $product.fulldescr ne ""}{$product.fulldescr}
<li><a href="#tabs" rel="tcontent2">Specifications</a></li>
{/if}


{if $active_modules.Detailed_Product_Images ne "" && ($config.Detailed_Product_Images.det_image_popup ne 'Y' || $js_enabled ne 'Y')}
{if $images ne ""}
<li><a href="#tabs" rel="tcontent3">Dimensions</a></li>
{/if}{/if}

{if $active_modules.Upselling_Products ne ""}
<li><a href="#tabs" rel="tcontent4">Related Items</a></li>
{/if}

</ul>

<div class="tabcontentstyle">

<div id="tcontent1" class="tabcontent">
{if $product.descr ne ""}{$product.descr}{ /if}
</div>

<div id="tcontent2" class="tabcontent">
{if $product.fulldescr ne ""}{$product.fulldescr}{/if}
</div>


{if $active_modules.Detailed_Product_Images ne "" && ($config.Detailed_Product_Images.det_image_popup ne 'Y' || $js_enabled ne 'Y')}
<div id="tcontent3" class="tabcontent">
{include file="modules/Detailed_Product_Images/product_images.tpl" }
</div>
{/if}

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

</div>

<script type="text/javascript">
//Start Tab Content script for UL with id="maintab" Separate multiple ids each with a comma.
initializetabcontent("maintab")
</script>

{* TABS MENU END *}
Reply With Quote
  #7  
Old 12-18-2008, 07:28 AM
 
ChristineP ChristineP is offline
 

eXpert
  
Join Date: Jul 2008
Posts: 310
 

Default Re: Short and Detailed description

Awesome, it worked. Thank you! Though I'm a novice at X-Cart, I'm actually customizing our cart with your expertise Vetrivel, and with what I've read on the forums.

Thanks again,
Christine

Quote:
Originally Posted by Vetrivel
If i am right .Your question is Why you get the TAB called test ?
then this is my answer
Remove the content marked in red.

Check it and tell me.

<li class="selected"><a href="#tabs" rel="tcontent1">Features</a></li>

{if $product.fulldescr ne ""}{$product.fulldescr}
<li><a href="#tabs" rel="tcontent2">Specifications</a></li>
{/if}
__________________
______________
version 4.1.9 Gold
Reply With Quote
  #8  
Old 12-18-2008, 08:21 AM
  Vetrivel's Avatar 
Vetrivel Vetrivel is offline
 

eXpert
  
Join Date: Apr 2008
Posts: 398
 

Default Re: Short and Detailed description

Welcome.
Have a nice day.
Quote:
Originally Posted by ChristineP
Awesome, it worked. Thank you! Though I'm a novice at X-Cart, I'm actually customizing our cart with your expertise Vetrivel, and with what I've read on the forums.

Thanks again,
Christine
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 01:20 PM.

   

 
X-Cart forums © 2001-2020