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

"Customers also bought" as the default tab

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-25-2013, 01:09 AM
 
franki franki is offline
 

Member
  
Join Date: Aug 2005
Posts: 13
 

Default "Customers also bought" as the default tab

Hi,

I'm trying to make "Customers also bought" as the default tab (instead of the "Send to friend" tab) when viewing the product details page.

I figured the file to edit is /skin/common_files/customer/main/ui-tabs.tpl

but I'm unable to make head or tail of the JQuery part to make this work:

Code:
(xcart ver 4.5.5) <script type="text/javascript"> //<![CDATA[ $(function() {ldelim} var days = ('function' != typeof window.func_is_allowed_cookie || func_is_allowed_cookie('ui-tabs-')) ? 1 : -1; var tOpts = {ldelim} idPrefix: '{$prefix|default:"ui-tabs-"}', cookie: {ldelim} expires: days {rdelim}{if $selected}, selected: '{$selected}'{/if} {rdelim}; $('#{$prefix}container').tabs(tOpts); {rdelim}); //]]> </script>

The rendered HTML is:
Code:
<script type="text/javascript"> //<![CDATA[ $(function() { var days = ('function' != typeof window.func_is_allowed_cookie || func_is_allowed_cookie('ui-tabs-')) ? 1 : -1; var tOpts = { idPrefix: 'product-tabs-', cookie: { expires: days } }; $('#product-tabs-container').tabs(tOpts); }); //]]> </script> <div id="product-tabs-container"> <ul> <li><a href="#product-tabs-send2friend">Send to friend</a></li> <li><a href="#product-tabs-recommends">Customers also bought</a></li> <li><a href="#product-tabs-feedback">Customer feedback</a></li> </ul>

Can anyone please help me or point me to the right direction?

Thanks.
__________________
Version: 4.5.x
Reply With Quote
  #2  
Old 03-01-2013, 05:14 PM
 
welly welly is offline
 

eXpert
  
Join Date: Mar 2011
Location: UK
Posts: 209
 

Default Re: "Customers also bought" as the default tab

Hi Franki,

ui-tabs.tpl isn't the file that governs the order of the tabs.

Addison provided some excellent details about tabs in the following post which may help you:

http://forum.x-cart.com/showthread.php?t=63596

You may well find the answer there.

Welly
__________________
X-Cart Business 5.3.6
Various add-ons

www.traininglines.co.uk
Reply With Quote

The following user thanks welly for this useful post:
franki (03-04-2013)
  #3  
Old 03-04-2013, 06:13 PM
 
franki franki is offline
 

Member
  
Join Date: Aug 2005
Posts: 13
 

Default Re: "Customers also bought" as the default tab

Thanks for that Welly!
__________________
Version: 4.5.x
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 07:16 PM.

   

 
X-Cart forums © 2001-2020